diff --git a/pages/search/[id].vue b/pages/search/[id].vue index 705b16217281c051ded52213adb2cfb8ab1af594..ee13415952a67401209fc5aef184d9299103495e 100644 --- a/pages/search/[id].vue +++ b/pages/search/[id].vue @@ -77,7 +77,7 @@ const markedEnd = '[DONE]' function initSearchItemInfo (info, records) { const { title, repo_name, repo_path, repo_branch, is_public } = info - Object.assign(state, { query: $firstRecordTitle.value, title, repo: repo_name, gitPath: repo_path, branch: repo_branch, isPublic: is_public }) + Object.assign(state, { query: $firstRecordTitle.value || title, title, repo: repo_name, gitPath: repo_path, branch: repo_branch, isPublic: is_public }) // 单独处理query,兼容临时title的历史记录 if (records && records.length > 0) { state.query = records[0].question