Skip to content

Commit

Permalink
Merge pull request #68 from Igor-lkm/master
Browse files Browse the repository at this point in the history
Fix prev page condition (follow-up)
  • Loading branch information
aravindnc committed Apr 1, 2020
2 parents c7cb3a1 + 71a9f38 commit 5be060d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function paginate(query, options, callback) {
if (page > 1) {
meta[labelHasPrevPage] = true;
meta[labelPrevPage] = (page - 1);
} else if (page == 1 && offset && offset !== 0) {
} else if (page == 1 && typeof offset !== 'undefined' && offset !== 0) {
meta[labelHasPrevPage] = true;
meta[labelPrevPage] = 1;
} else {
Expand Down

0 comments on commit 5be060d

Please sign in to comment.