Skip to content

Commit

Permalink
fix js error
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Jan 8, 2025
1 parent 730ef3e commit 1acc140
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web_src/js/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function parseIssueHref(href: string): IssuePathInfo {
export function parseIssueNewHref(href: string): IssuePathInfo {
const path = (href || '').replace(/[#?].*$/, '');
const [_, ownerName, repoName, pathTypeField] = /([^/]+)\/([^/]+)\/(issues\/new|compare\/.+\.\.\.)/.exec(path) || [];
const pathType = pathTypeField.startsWith('issues/new') ? 'issues' : 'pulls';
const pathType = pathTypeField?.startsWith('issues/new') ? 'issues' : 'pulls';
return {ownerName, repoName, pathType};
}

Expand Down

0 comments on commit 1acc140

Please sign in to comment.