Skip to content

Commit 86775a6

Browse files
committed
Fixed unpaged url.
1 parent e9b4832 commit 86775a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Requestable.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,11 @@ class Requestable {
257257

258258
const nextUrl = getNextPage(response.headers.link);
259259
if(nextUrl) {
260+
if (!options) {
261+
options = {};
262+
}
260263
options.page = parseInt(
261-
nextUrl.match(/(&page=[0-9]*)/g)
264+
nextUrl.match(/(page=[0-9]*)/g)
262265
.shift()
263266
.split('=')
264267
.pop()

0 commit comments

Comments
 (0)