From f87028f3128ba0c5c1b55bc6a613493fc9f19dbd Mon Sep 17 00:00:00 2001 From: Apisit Ritreungroj Date: Thu, 17 Oct 2024 12:55:53 +0700 Subject: [PATCH] chore: complete calling function --- .../assets/js/catalyst_compression.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/catalyst_voices_packages/catalyst_compression/catalyst_compression_web/assets/js/catalyst_compression.js b/catalyst_voices_packages/catalyst_compression/catalyst_compression_web/assets/js/catalyst_compression.js index 06c7d6ac390..4a1c1f4eedf 100644 --- a/catalyst_voices_packages/catalyst_compression/catalyst_compression_web/assets/js/catalyst_compression.js +++ b/catalyst_voices_packages/catalyst_compression/catalyst_compression_web/assets/js/catalyst_compression.js @@ -53,17 +53,19 @@ function runCompressionInWorker(fnName) { } if (result) { - complete(resolve(result)); + resolve(result); } else { - complete(reject(error || 'Unexpected error')); + reject(error || 'Unexpected error'); } processingIdsPool.delete(id); + complete(); }, (error, complete) => { - complete(reject(error)); + reject(error); processingIdsPool.clear(); + complete(); } );