From 2a0b30de5c414c7a70294499a70908b2666a7591 Mon Sep 17 00:00:00 2001 From: StyleZhang Date: Thu, 26 Sep 2024 14:39:56 +0800 Subject: [PATCH] fix: image.enable --- web/app/components/base/chat/chat-with-history/chat-wrapper.tsx | 2 +- web/app/components/base/chat/chat/answer/index.tsx | 2 +- web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx b/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx index b2bedb785f..6520696934 100644 --- a/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx +++ b/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx @@ -75,7 +75,7 @@ const ChatWrapper = () => { parent_message_id: last_answer?.id || getLastAnswer(chatListRef.current)?.id || null, } - if (appConfig?.file_upload?.image.enabled && files?.length) + if (appConfig?.file_upload?.image?.enabled && files?.length) data.files = files handleSend( diff --git a/web/app/components/base/chat/chat/answer/index.tsx b/web/app/components/base/chat/chat/answer/index.tsx index 3b7c8308ad..1ee098a1db 100644 --- a/web/app/components/base/chat/chat/answer/index.tsx +++ b/web/app/components/base/chat/chat/answer/index.tsx @@ -156,7 +156,7 @@ const Answer: FC = ({ ) } { - allFiles?.length && ( + !!allFiles?.length && ( { parent_message_id: last_answer?.id || getLastAnswer(chatListRef.current)?.id || null, } - if (appConfig?.file_upload?.image.enabled && files?.length) + if (appConfig?.file_upload?.image?.enabled && files?.length) data.files = files handleSend(