From 974828222e813f003d4b80f78ddfb3bfb284b788 Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 8 Apr 2024 14:37:39 +0800 Subject: [PATCH] fix: chat app sometimes may crash (#3151) --- web/app/components/share/chat/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/components/share/chat/index.tsx b/web/app/components/share/chat/index.tsx index 381558922d..4441bbc1ae 100644 --- a/web/app/components/share/chat/index.tsx +++ b/web/app/components/share/chat/index.tsx @@ -557,7 +557,7 @@ const Main: FC = ({ conversation_id: isNewConversation ? null : currConversationId, } - if (visionConfig.enabled && files && files?.length > 0) { + if (visionConfig?.enabled && files && files?.length > 0) { data.files = files.map((item) => { if (item.transfer_method === TransferMethod.local_file) { return {