Skip to content

Commit f9ccf22

Browse files
Algorithm5838github-actions[bot]
authored andcommitted
fix: preserve chat controls on chat remount
1 parent 70eb7ca commit f9ccf22

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
@@ -2842,9 +2842,9 @@
28422842
};
28432843
28442844
const saveControls = async () => {
2845-
if (!$chatId || $temporaryChatEnabled) return;
2846-
await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch((err) =>
2847-
console.error('[controls autosave]', err)
2845+
if (loading || !$chatId || $temporaryChatEnabled) return;
2846+
await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch(
2847+
(err) => console.error('[controls autosave]', err)
28482848
);
28492849
};
28502850

0 commit comments

Comments
 (0)