From 1e7a364c68c534cfda43f0737464f074e4222af5 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 17 Jul 2024 19:04:18 +0200 Subject: [PATCH] fix --- src/lib/components/chat/Controls/Controls.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/Controls/Controls.svelte b/src/lib/components/chat/Controls/Controls.svelte index fe2036286..ee8fcfff3 100644 --- a/src/lib/components/chat/Controls/Controls.svelte +++ b/src/lib/components/chat/Controls/Controls.svelte @@ -33,8 +33,8 @@
{$i18n.t('Files')}
-
- {#each chatFiles as file} +
+ {#each chatFiles as file, fileIdx} { // Remove the file from the chatFiles array - chatFiles = chatFiles.filter((f) => f.id !== file.id); + + chatFiles.splice(fileIdx, 1); + chatFiles = chatFiles; }} /> {/each}