Skip to content

Commit 124b7e9

Browse files
committed
refac
1 parent 4764dd5 commit 124b7e9

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
@@ -2647,7 +2647,7 @@
26472647
const MAX_DRAFT_LENGTH = 5000;
26482648
let saveDraftTimeout: ReturnType<typeof setTimeout> | null = null;
26492649
2650-
const saveDraft = async (draft, chatId = null) => {
2650+
const saveDraft = async (draft: any, chatId: string | null = null) => {
26512651
if (saveDraftTimeout) {
26522652
clearTimeout(saveDraftTimeout);
26532653
}
@@ -2664,7 +2664,7 @@
26642664
}
26652665
};
26662666
2667-
const clearDraft = async (chatId = null) => {
2667+
const clearDraft = async (chatId: string | null = null) => {
26682668
if (saveDraftTimeout) {
26692669
clearTimeout(saveDraftTimeout);
26702670
}
@@ -2937,7 +2937,7 @@
29372937
}
29382938
}}
29392939
on:submit={async (e) => {
2940-
clearDraft();
2940+
clearDraft($chatId);
29412941
if (e.detail || files.length > 0) {
29422942
await tick();
29432943

0 commit comments

Comments
 (0)