Skip to content

Conversation

@louisfisch
Copy link

Correct the logic that computes the next page index so it no longer requests a page beyond the available range.

Q A
Bug fix? yes
New feature? no
BC breaks? no
Related Issue
Need Doc update no

Describe your change

It fixes the nextKey calculation by adding 1 to pageNumber. it is necessary because pageNumber starts at 0.

What problem is this fixing?

It requests a page beyond the available range when reaching the last page, which leads to an unnecessary request to the Algolia API.

Correct the logic that computes the next page index so it no longer requests a page beyond the available range.
@louisfisch louisfisch requested a review from a team as a code owner October 24, 2025 10:05
@louisfisch louisfisch requested review from aymeric-giraudet and dhayab and removed request for a team October 24, 2025 10:05
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.

1 participant