Преглед изворни кода

fix: chat app sometimes may crash (#3151)

Joel пре 1 година
родитељ
комит
974828222e
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      web/app/components/share/chat/index.tsx

+ 1 - 1
web/app/components/share/chat/index.tsx

@@ -557,7 +557,7 @@ const Main: FC<IMainProps> = ({
       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 {