Skip to content

Commit 1a38f65

Browse files
committed
fix: preserve chat controls on chat remount
1 parent 89f03c5 commit 1a38f65

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
@@ -2840,9 +2840,9 @@
28402840
};
28412841
28422842
const saveControls = async () => {
2843-
if (!$chatId || $temporaryChatEnabled) return;
2844-
await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch((err) =>
2845-
console.error('[controls autosave]', err)
2843+
if (loading || !$chatId || $temporaryChatEnabled) return;
2844+
await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch(
2845+
(err) => console.error('[controls autosave]', err)
28462846
);
28472847
};
28482848

0 commit comments

Comments
 (0)