From cbb09111ff650f08f1d132142f65c4634626bd75 Mon Sep 17 00:00:00 2001 From: Federico Date: Sun, 27 Dec 2020 18:29:54 -0600 Subject: Update dependencies (#3850) --- source/github-helpers/api.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/github-helpers/api.ts') 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; } } -- cgit v1.2.3