Skip to content

Commit

Permalink
Use null coalescing
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Sep 12, 2023
1 parent 430e0d7 commit 954aade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function shortenURL(href, currentUrl = 'https://github.com') {
const [, downloadTag, downloadFilename] = repoPath.match(releaseDownloadRegex) || [];
const [, label] = repoPath.match(labelRegex) || [];
const [, compare] = repoPath.match(compareRegex) || [];
const {pull, pullPage, pullPartialStart, pullPartialEnd} = (repoPath.match(pullRegex) || {groups: {}}).groups;
const {pull, pullPage, pullPartialStart, pullPartialEnd} = repoPath.match(pullRegex)?.groups ?? {}

Check failure on line 112 in index.js

View workflow job for this annotation

GitHub Actions / Lint

Missing semicolon.
const [, issue] = isRedirection ? repoPath.match(issueRegex) || [] : [];

Check failure on line 113 in index.js

View workflow job for this annotation

GitHub Actions / Lint

Missing semicolon.
const [, commit] = isRedirection ? repoPath.match(commitRegex) || [] : [];
const isFileOrDir = revision && [
Expand Down

0 comments on commit 954aade

Please sign in to comment.