Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Nov 7, 2024
1 parent 7afe71a commit 75f3613
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions web_src/js/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {encode, decode} from 'uint8-to-base64';
import {decode, encode} from 'uint8-to-base64';
import type {IssuePageInfo, IssuePathInfo} from './types.ts';

// transform /path/to/file.ext to file.ext
Expand Down Expand Up @@ -45,12 +45,12 @@ export function parseIssueNewHref(href: string): IssuePathInfo {

export function parseIssuePageInfo(): IssuePageInfo {
const el = document.querySelector('#issue-page-info');
const info = {} as IssuePageInfo;
info.issueNumber = parseInt(el?.getAttribute('data-issue-index'));
info.issueDependencySearchType = el?.getAttribute('data-issue-dependency-search-type') || '';
info.repoId = parseInt(el?.getAttribute('data-issue-repo-id'));
info.repoLink = el?.getAttribute('data-issue-repo-link') || '';
return info;
return {
issueNumber: parseInt(el?.getAttribute('data-issue-index')),
issueDependencySearchType: el?.getAttribute('data-issue-dependency-search-type') || '',
repoId: parseInt(el?.getAttribute('data-issue-repo-id')),
repoLink: el?.getAttribute('data-issue-repo-link') || '',
};
}

// parse a URL, either relative '/path' or absolute 'https://localhost/path'
Expand Down

0 comments on commit 75f3613

Please sign in to comment.