Skip to content

Commit

Permalink
make sure we user 0 indexing in paging
Browse files Browse the repository at this point in the history
  • Loading branch information
moch-elearning committed Jun 14, 2019
1 parent 18090d5 commit 7b38e27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/restful.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class RestIter<Data> implements Iter<Data> {
return null

let begin = this.begin_next
let end = begin + this.page_size
let end = begin + ( this.page_size - 1 )
if( this.total > -1 && end > this.total )
end = this.total
this.begin_next = end + 1
Expand Down

0 comments on commit 7b38e27

Please sign in to comment.