From 07b9df5b5c55658a8f2409bc4ae2c74868d84755 Mon Sep 17 00:00:00 2001 From: winter <2453101190@qq.com> Date: Thu, 25 Apr 2024 16:43:26 +0800 Subject: [PATCH] fix type error --- web/src/store/modules/chat/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/store/modules/chat/index.ts b/web/src/store/modules/chat/index.ts index 007dddea..2e4f6f12 100644 --- a/web/src/store/modules/chat/index.ts +++ b/web/src/store/modules/chat/index.ts @@ -46,9 +46,9 @@ export const useChatStore = defineStore('chat-store', { return (uuid?: string) => { if (uuid) return state.chat[uuid] ?? [] - return ( - state.chat[state.active] ?? [] - ) + if (state.active) + return state.chat[state.active] ?? [] + return [] } }, },