refactor: use pool side task functions list for hasTaskFunction()
[poolifier.git] / src / worker / abstract-worker.ts
index 1b64dc4f4cfff7c769ade8ef2bbd100efa1885ab..8cd370de2e3b7671c2f697c106acff3dc12e267f 100644 (file)
@@ -355,9 +355,7 @@ export abstract class AbstractWorker<
   ): void {
     const { taskFunctionOperation, taskFunction, taskFunctionName } = message
     let response!: TaskFunctionOperationReturnType
-    if (taskFunctionOperation === 'has') {
-      response = this.hasTaskFunction(taskFunctionName as string)
-    } else if (taskFunctionOperation === 'add') {
+    if (taskFunctionOperation === 'add') {
       response = this.addTaskFunction(
         taskFunctionName as string,
         // eslint-disable-next-line @typescript-eslint/no-implied-eval, no-new-func