Skip to content

Commit 38ffcab

Browse files
committed
fix: preserve chat controls on chat remount
1 parent 86f8a5f commit 38ffcab

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib/components/chat/Chat.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2888,9 +2888,9 @@
28882888
};
28892889
28902890
const saveControls = async () => {
2891-
if (!$chatId || $temporaryChatEnabled) return;
2892-
await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch((err) =>
2893-
console.error('[controls autosave]', err)
2891+
if (loading || !$chatId || $temporaryChatEnabled) return;
2892+
await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch(
2893+
(err) => console.error('[controls autosave]', err)
28942894
);
28952895
};
28962896

0 commit comments

Comments
 (0)