refactor objects, add optional chaining

This commit is contained in:
Ilya Kantor 2020-05-03 16:56:16 +03:00
parent 09a964e969
commit b057341f6c
35 changed files with 579 additions and 435 deletions

View file

@ -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;

View file

@ -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;