Skip to content

Conversation

@raquelarrojo
Copy link
Collaborator

@raquelarrojo raquelarrojo commented Jun 14, 2023

Checklist
(Check off all the items before submitting)

  • Build process is done without errors and all tests pass in /lib directory.
  • Self-reviewed the code prior to submitting.
  • Meets accessibility standards.
  • Added/updated documentation to /website as needed.
  • Added/updated tests as needed.

Description
Paginator fails when itemsPerPage is 0 and showGoToPage is true, since it is making this operation totalItems / itemsPerPage. The result of this operation (totalItems / 0) is Infinity. So when it is trying to make Array(Infinity) it fails.

Closes #1619

@raquelarrojo raquelarrojo marked this pull request as ready for review June 14, 2023 07:40
@GomezIvann GomezIvann self-requested a review June 14, 2023 08:27
@GomezIvann GomezIvann self-assigned this Jun 14, 2023
GomezIvann
GomezIvann previously approved these changes Jun 14, 2023
@GomezIvann GomezIvann merged commit be93a22 into master Jun 14, 2023
@GomezIvann GomezIvann deleted the rarrojolopez-paginator-fix branch June 14, 2023 15:48
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.

Paginator fails when itemsPerPage is 0 and showGoToPage is true

3 participants