Skip to content

Commit

Permalink
fix pagination custom headers example
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Gallo committed Jun 23, 2016
1 parent b7147e4 commit dbeacb9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/paginationCustomHeaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ github.issues.getForRepo({
showIssueIds(res);
console.log('END of PAGE 1');

github.getNextPage(res, customHeaders, function(err, res) {
showIssueIds(res);
});
if (github.hasNextPage(res)) {
github.getNextPage(res, customHeaders, function(err, res) {
showIssueIds(res);
});
}
});

function showIssueIds(res) {
Expand Down

0 comments on commit dbeacb9

Please sign in to comment.