summaryrefslogtreecommitdiff
path: root/source/github-helpers/api.ts
diff options
context:
space:
mode:
Diffstat (limited to 'source/github-helpers/api.ts')
-rw-r--r--source/github-helpers/api.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/github-helpers/api.ts b/source/github-helpers/api.ts
index 56efbea1..c2fa63eb 100644
--- a/source/github-helpers/api.ts
+++ b/source/github-helpers/api.ts
@@ -153,8 +153,10 @@ export const v3paginated = async function * (
const response = await v3(query, options);
yield response;
- [, query] = /<([^>]+)>; rel="next"/.exec(response.headers.get('link')!) ?? [];
- if (!query) {
+ const match = /<([^>]+)>; rel="next"/.exec(response.headers.get('link')!);
+ if (match) {
+ query = match[1]!;
+ } else {
return;
}
}