From 28129600886f8591ac5e0db4a4addebe24f295fd Mon Sep 17 00:00:00 2001 From: wukko Date: Thu, 16 Jan 2025 13:46:52 +0600 Subject: [PATCH] web/cutout: reset the page state if the worker breaks --- web/src/routes/cutout/+page.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/routes/cutout/+page.svelte b/web/src/routes/cutout/+page.svelte index 23ff14c3..fb51f235 100644 --- a/web/src/routes/cutout/+page.svelte +++ b/web/src/routes/cutout/+page.svelte @@ -46,7 +46,9 @@ }; worker.onerror = (e) => { - console.error("bg removal worker exploded:", e) + console.error("bg removal worker exploded:", e); + + state = "empty"; worker.terminate(); } };