Skip to content

Commit 1acc140

Browse files
committed
fix js error
1 parent 730ef3e commit 1acc140

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function parseIssueHref(href: string): IssuePathInfo {
4040
export function parseIssueNewHref(href: string): IssuePathInfo {
4141
const path = (href || '').replace(/[#?].*$/, '');
4242
const [_, ownerName, repoName, pathTypeField] = /([^/]+)\/([^/]+)\/(issues\/new|compare\/.+\.\.\.)/.exec(path) || [];
43-
const pathType = pathTypeField.startsWith('issues/new') ? 'issues' : 'pulls';
43+
const pathType = pathTypeField?.startsWith('issues/new') ? 'issues' : 'pulls';
4444
return {ownerName, repoName, pathType};
4545
}
4646

0 commit comments

Comments
 (0)