Skip to content

Commit

Permalink
improvement(paginator): use better metric for hasPages property
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Sep 4, 2021
1 parent 0a454f6 commit 3477c4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/Paginator/SimplePaginator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class SimplePaginator extends Array implements SimplePaginatorContract<an
/**
* Find if there are enough results to be paginated or not
*/
public readonly hasPages: boolean = this.currentPage !== 1 || this.hasMorePages
public readonly hasPages: boolean = this.lastPage !== 1

constructor(
private totalNumber: number,
Expand Down

0 comments on commit 3477c4b

Please sign in to comment.