Skip to content

Commit 66390e9

Browse files
jeffstielerAurelioDeRosa
authored andcommitted
requestAllPages: Wrap response in array if needed
Fixes gh-267 Closes gh-268
1 parent dbe4599 commit 66390e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/github.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@
107107
return cb(err);
108108
}
109109

110+
if (!(res instanceof Array)) {
111+
res = [res];
112+
}
113+
110114
results.push.apply(results, res);
111115

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

0 commit comments

Comments
 (0)