File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1- import { encode , decode } from 'uint8-to-base64' ;
1+ import { decode , encode } from 'uint8-to-base64' ;
22import 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
4646export 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'
You can’t perform that action at this time.
0 commit comments