We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 730ef3e commit 1acc140Copy full SHA for 1acc140
web_src/js/utils.ts
@@ -40,7 +40,7 @@ export function parseIssueHref(href: string): IssuePathInfo {
40
export function parseIssueNewHref(href: string): IssuePathInfo {
41
const path = (href || '').replace(/[#?].*$/, '');
42
const [_, ownerName, repoName, pathTypeField] = /([^/]+)\/([^/]+)\/(issues\/new|compare\/.+\.\.\.)/.exec(path) || [];
43
- const pathType = pathTypeField.startsWith('issues/new') ? 'issues' : 'pulls';
+ const pathType = pathTypeField?.startsWith('issues/new') ? 'issues' : 'pulls';
44
return {ownerName, repoName, pathType};
45
}
46
0 commit comments