Skip to content

Commit 75f3613

Browse files
committed
fix syntax
1 parent 7afe71a commit 75f3613

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

web_src/js/utils.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {encode, decode} from 'uint8-to-base64';
1+
import {decode, encode} from 'uint8-to-base64';
22
import type {IssuePageInfo, IssuePathInfo} from './types.ts';
33

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

4646
export function parseIssuePageInfo(): IssuePageInfo {
4747
const el = document.querySelector('#issue-page-info');
48-
const info = {} as IssuePageInfo;
49-
info.issueNumber = parseInt(el?.getAttribute('data-issue-index'));
50-
info.issueDependencySearchType = el?.getAttribute('data-issue-dependency-search-type') || '';
51-
info.repoId = parseInt(el?.getAttribute('data-issue-repo-id'));
52-
info.repoLink = el?.getAttribute('data-issue-repo-link') || '';
53-
return info;
48+
return {
49+
issueNumber: parseInt(el?.getAttribute('data-issue-index')),
50+
issueDependencySearchType: el?.getAttribute('data-issue-dependency-search-type') || '',
51+
repoId: parseInt(el?.getAttribute('data-issue-repo-id')),
52+
repoLink: el?.getAttribute('data-issue-repo-link') || '',
53+
};
5454
}
5555

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

0 commit comments

Comments
 (0)