From 227d9521125431b4e879661a52fce78b7220c118 Mon Sep 17 00:00:00 2001 From: jmal Date: Wed, 4 Jun 2025 14:02:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E4=B8=BA=E7=A9=BA=E6=97=B6=E7=9A=84=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在搜索历史 API 调用失败时,确保返回非空数组 - 避免在搜索建议列表为空时出现错误或异常 --- src/components/ShowFile/ShowFile.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 2c29207..0028e7b 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -4683,6 +4683,7 @@ export default { cb(this.searchSuggestions) }).catch(error => { console.error("Error fetching search history:", error) + cb(this.searchSuggestions.length > 0 ? this.searchSuggestions : []) }) }, handleSelectSuggestion(item) {