Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Reorder of updating max_page, current_page #34

Merged
merged 1 commit into from May 21, 2014
Merged

Reorder of updating max_page, current_page #34

merged 1 commit into from May 21, 2014

Conversation

wm
Copy link
Contributor

@wm wm commented Apr 9, 2014

This commit changes the order in which we set current_page and max_page
to ensure we always set current_page first.

This will prevent the error:

jqPagination: max_page lower than current_page

from occuring when we simultaneously update max_page and current_page
and max_page is less than the old current_page.

Steps to Reproduce in v1.3

.jqPagination('option', {
    max_page: 6,
    current_page: 2,
    trigger: false
});

.jqPagination('option', {
    max_page: 1,
    current_page: 1,
    trigger: false
});

This commit changes the order in which we set current_page and max_page
to ensure we always set current_page first.

This will prevent the error:

    jqPagination: max_page lower than current_page

from occuring when we simultaneously update max_page and current_page
and max_page is less than the old current_page.
@beneverard beneverard merged commit 06a0f7c into beneverard:master May 21, 2014
beneverard added a commit that referenced this pull request May 21, 2014
@beneverard
Copy link
Owner

@wm Thanks for your fix Will! This has now been merged back into the master branch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants