From d1126ace823d174ae0f3c7e5d4b547d0ce17bd97 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 19 Sep 2026 14:44:35 +0200 Subject: [PATCH] fix(web): don't run file downloads as a $derived side effect --- packages/frontend/src/lib/ui/ShowNote.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/lib/ui/ShowNote.svelte b/packages/frontend/src/lib/ui/ShowNote.svelte index 2f39fe0..513318e 100644 --- a/packages/frontend/src/lib/ui/ShowNote.svelte +++ b/packages/frontend/src/lib/ui/ShowNote.svelte @@ -46,11 +46,11 @@ async function downloadFile(file: FileDTO) { files = note.contents } }) - let download = $derived(() => { + function downloadAll() { for (const file of files) { downloadFile(file) } - }) + } let links = $derived(typeof note.contents === 'string' ? note.contents.match(RE_URL) : []) @@ -92,7 +92,7 @@ async function downloadFile(file: FileDTO) { {/key} {/if} {/each} - + {/if}