Skip to content

Commit

Permalink
Merge pull request #460 from sublinks/fix/first-page-result
Browse files Browse the repository at this point in the history
Fix pagination to start from page 1 instead of 0.
  • Loading branch information
Pdzly authored Aug 16, 2024
2 parents 791a596 + 48ef59a commit bdef0bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public Results setPerPage(final Integer perPage) {

public Results setPage(final Integer page) {

int p = Math.max(Math.abs(page), 0);
int p = Math.max(Math.abs(page), 1);
getQuery().setFirstResult((p - 1) * this.getPerPage());
return this;
}
Expand Down

0 comments on commit bdef0bf

Please sign in to comment.