diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index bc4b49b76..6e0636c2c 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -890,7 +890,7 @@ return null; }); - if (res !== null) { + if (res !== null && res.messages) { // Update chat history with the new messages for (const message of res.messages) { history.messages[message.id] = {