Skip to content

Conversation

dlebedynskyi
Copy link

added check to avoid undefined error is no pager was created yet

@michaelbromley
Copy link
Owner

Hi,
Thanks for the contribution. Could you outline the scenario that causes an error which is fixed by this?

@dlebedynskyi
Copy link
Author

@michaelbromley this one of cases when we have on pagination called before data received. Hard to say exact cause it is in deps of ng-view navigation with bunch of pagination and requests . I'll check and try to get some details for you.
also note that https://github.com/michaelbromley/angularUtils-pagination has same issue. Just updated to packed and had to patch same line

@dlebedynskyi
Copy link
Author

Update. Ok we have a call to reset current page numbers. this call may not be in correct point(ill try to work on it on my side ) but it leads to the point when there are 'new' that is awaiting for data, and old ones.
we call

 if (paginationService.isRegistered(instance))
                            paginationService.setCurrentPage(instance, 1);

for all. and at that point they don't have currentPageParser initialized yet

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

Successfully merging this pull request may close these issues.

2 participants