Skip to content

adjustMultiple not updated when change showMultiple from >1 to 1 #415

Open
@kynn84

Description

@kynn84

Hi,

Recently, i've encounter a problem when i change the showMultiple option from 2 to 1 and call for updateSlider()

i found out that form the code:

1 < b.showMultiple && (b.showMultiple > a.pages && (b.showMultiple = a.pages), a.adjustMultiple = b.infiniteSlides && 1 < a.pages ? 0 : b.showMultiple - 1);

since i'm changing the value of showMultiple from 2 to 1, it will not reset the value of adjustMultiple form 1 to 0, since the function will only execute when showMultiple is bigger than 1.
This will cause the prev and next button to be displayed incorrectly

i think the best solution is to reset the value of adjustMultiple to 0 before the that line i.e,

a.adjustMultiple = 0;
1 < b.showMultiple && (b.showMultiple > a.pages && (b.showMultiple = a.pages), a.adjustMultiple = b.infiniteSlides && 1 < a.pages ? 0 : b.showMultiple - 1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions