From 8a5b25b4ce96b0a53bca26869bf5a142ad9ef485 Mon Sep 17 00:00:00 2001 From: wukko Date: Fri, 17 Jan 2025 01:51:10 +0600 Subject: [PATCH] web/removebg: fix the incorrect file condition --- web/src/lib/workers/removebg.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/lib/workers/removebg.ts b/web/src/lib/workers/removebg.ts index 66b6fc3c..012dd468 100644 --- a/web/src/lib/workers/removebg.ts +++ b/web/src/lib/workers/removebg.ts @@ -63,7 +63,7 @@ const removeImageBackground = async (file: File) => { } self.onmessage = async (event: MessageEvent) => { - if (event.data.cobaltRemoveBgWorker.file) { + if (event.data.cobaltRemoveBgWorker) { await removeImageBackground(event.data.cobaltRemoveBgWorker.file); self.close(); }