Skip to content

best way to save what you love

web/cutout: reset the page state if the worker breaks

wukko28129600886f
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();
}
};