Skip to content

Commit

Permalink
Merge pull request #409 from pivotaltracker/fetch-only-one-page
Browse files Browse the repository at this point in the history
feat: use the page option to fetch a single page
  • Loading branch information
mtscout6 authored Jan 11, 2017
2 parents 46dd1d7 + 21fe6b6 commit f43d486
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Requestable.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class Requestable {
results.push(...thisGroup);

const nextUrl = getNextPage(response.headers.link);
if (nextUrl) {
if (nextUrl && typeof options.page !== 'number') {
log(`getting next page: ${nextUrl}`);
return this._requestAllPages(nextUrl, options, cb, results);
}
Expand Down

0 comments on commit f43d486

Please sign in to comment.