Skip to content

Commit

Permalink
Merge pull request #22 from ReeceM/patch-prevent-loop
Browse files Browse the repository at this point in the history
Update paginator.js
  • Loading branch information
ReeceM authored Feb 19, 2023
2 parents 43bc5df + 12069e9 commit 0b8a4c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/paginator.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ const paginator = {
}
);

if (results.length <= 0) {
return Promise.resolve();
}

this.results.push(...results);

if (total_pages !== page) {
Expand Down

0 comments on commit 0b8a4c6

Please sign in to comment.