aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/routes
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2023-09-29 09:46:26 -0500
committerMatt Strapp <matt@mattstrapp.net>2023-09-29 09:46:26 -0500
commit3ca152a966b776a07a8b81ff1408fe0d4ffd2376 (patch)
tree75f7fbbad41ae4d731d024cff2ad9ed3c2a0f9db /app/src/routes
parentForgor an icon (diff)
downloadtrinkets-3ca152a966b776a07a8b81ff1408fe0d4ffd2376.tar
trinkets-3ca152a966b776a07a8b81ff1408fe0d4ffd2376.tar.gz
trinkets-3ca152a966b776a07a8b81ff1408fe0d4ffd2376.tar.bz2
trinkets-3ca152a966b776a07a8b81ff1408fe0d4ffd2376.tar.lz
trinkets-3ca152a966b776a07a8b81ff1408fe0d4ffd2376.tar.xz
trinkets-3ca152a966b776a07a8b81ff1408fe0d4ffd2376.tar.zst
trinkets-3ca152a966b776a07a8b81ff1408fe0d4ffd2376.zip
Destroy web worker when navigated away
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'app/src/routes')
-rw-r--r--app/src/routes/truncate/+page.svelte6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/routes/truncate/+page.svelte b/app/src/routes/truncate/+page.svelte
index 104785d..e0dda30 100644
--- a/app/src/routes/truncate/+page.svelte
+++ b/app/src/routes/truncate/+page.svelte
@@ -4,7 +4,7 @@
import Icon from '@iconify/svelte';
import fileStorage from '@iconify/icons-carbon/file-storage';
import { FileDropzone, ProgressBar } from '@skeletonlabs/skeleton';
- import { onMount } from 'svelte';
+ import { onDestroy, onMount } from 'svelte';
let disableInput = false;
let files: FileList;
@@ -31,6 +31,10 @@
truncateTo = 1;
};
});
+
+ onDestroy(() => {
+ worker.terminate()
+ })
</script>
<svelte:head>