refactor objects, add optional chaining
This commit is contained in:
parent
09a964e969
commit
b057341f6c
35 changed files with 579 additions and 435 deletions
|
@ -301,7 +301,7 @@ async function* fetchCommits(repo) {
|
|||
|
||||
// (3) the URL of the next page is in the headers, extract it
|
||||
let nextPage = response.headers.get('Link').match(/<(.*?)>; rel="next"/);
|
||||
nextPage = nextPage && nextPage[1];
|
||||
nextPage = nextPage?.[1];
|
||||
|
||||
url = nextPage;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
// the URL of the next page is in the headers, extract it
|
||||
let nextPage = response.headers.get('Link').match(/<(.*?)>; rel="next"/);
|
||||
nextPage = nextPage && nextPage[1];
|
||||
nextPage = nextPage?.[1];
|
||||
|
||||
url = nextPage;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue