Skip to content

fix(pagination): handle page size zero#1877

Open
akashsonune wants to merge 1 commit intomainfrom
fix/handle-page-size-sero
Open

fix(pagination): handle page size zero#1877
akashsonune wants to merge 1 commit intomainfrom
fix/handle-page-size-sero

Conversation

@akashsonune
Copy link
Copy Markdown
Member

@akashsonune akashsonune commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the calculation of total pages in the pagination component by replacing the nullish coalescing operator with a logical OR operator for the page size. This change ensures that a page size of zero defaults to one, preventing potential division by zero errors. I have no feedback to provide.

@akashsonune akashsonune force-pushed the fix/handle-page-size-sero branch from 53499ad to e9323ad Compare April 15, 2026 13:27
@akashsonune akashsonune marked this pull request as ready for review April 15, 2026 15:42
@akashsonune akashsonune requested review from a team as code owners April 15, 2026 15:42
@akashsonune akashsonune requested a review from dr-itz April 15, 2026 15:42
@ljanner
Copy link
Copy Markdown
Member

ljanner commented Apr 15, 2026

Seems like we lack test coverage for the pagination component.

Can we either add more test coverage here or otherwise create an issue so we are aware and have it on the backlog. The component has many edge cases, which are not covered by tests. For example currentPage > totalPages

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