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

This commit is contained in:
wukko 2025-01-16 13:46:52 +06:00
parent f544768784
commit 2812960088
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

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