Skip to content

Commit

Permalink
requestAllPages: Wrap response in array if needed
Browse files Browse the repository at this point in the history
Fixes gh-267
Closes gh-268
  • Loading branch information
jeffstieler authored and AurelioDeRosa committed Jan 24, 2016
1 parent dbe4599 commit 66390e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
return cb(err);
}

if (!(res instanceof Array)) {
res = [res];
}

results.push.apply(results, res);

var links = (xhr.getResponseHeader('link') || '').split(/\s*,\s*/g);
Expand Down

0 comments on commit 66390e9

Please sign in to comment.