Skip to content

Commit 3d718f3

Browse files
Algorithm5838github-actions[bot]
authored andcommitted
fix: preserve chat controls on chat remount
1 parent 4fac0c7 commit 3d718f3

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)