fix: chat app sometimes may crash (#3151)

This commit is contained in:
Joel
2024-04-08 14:37:39 +08:00
committed by GitHub
parent a9700e61db
commit 974828222e

View File

@@ -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 {