From 646d040a3beab622286af393459777f74b1366ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 16 Jul 2023 19:42:14 +0200 Subject: [PATCH] refactor: cleanup worker.addTaskFunction() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/worker/abstract-worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index 8a6b2104..7d5494de 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -198,8 +198,8 @@ export abstract class AbstractWorker< if (typeof fn !== 'function') { throw new TypeError('fn parameter is not a function') } - const boundFn = fn.bind(this) try { + const boundFn = fn.bind(this) if ( this.taskFunctions.get(name) === this.taskFunctions.get(DEFAULT_TASK_NAME) -- 2.34.1