mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-03 11:33:24 +09:00
refactor: improve types in the frontend, misc fixes (#39142)
This commit is contained in:
@@ -71,11 +71,11 @@ export async function matchMention(mentionsUrl: string, queryText: string): Prom
|
||||
return sortAndReduce(results);
|
||||
}
|
||||
|
||||
export async function matchIssue(owner: string, repo: string, issueIndexStr: string, query: string, signal: AbortSignal): Promise<Issue[]> {
|
||||
export async function matchIssue(owner: string, repo: string, issueIndexStr: string | undefined, query: string, signal: AbortSignal): Promise<Issue[]> {
|
||||
const res = await GET(`${window.config.appSubUrl}/${owner}/${repo}/issues/suggestions?q=${encodeURIComponent(query)}`, {signal});
|
||||
|
||||
const issues: Issue[] = await res.json();
|
||||
const issueNumber = parseInt(issueIndexStr);
|
||||
const issueNumber = parseInt(issueIndexStr || '');
|
||||
|
||||
// filter out issue with same id
|
||||
return issues.filter((i) => i.number !== issueNumber);
|
||||
|
||||
Reference in New Issue
Block a user