fix: fix pool `execute()` arguments checking
[poolifier.git] / src / worker / cluster-worker.ts
index 35899e794f5b373aa5bca3ec5b3dbe2d1f5cd4c3..26964aa489f83fff90f8e4306c3dc1bbafc36f23 100644 (file)
@@ -45,7 +45,7 @@ export class ClusterWorker<
   protected handleReadyMessage (message: MessageValue<Data>): void {
     if (message.workerId === this.id && message.ready === false) {
       try {
-        this.getMainWorker()?.on('message', this.messageListener.bind(this))
+        this.getMainWorker().on('message', this.messageListener.bind(this))
         this.sendToMainWorker({
           ready: true,
           taskFunctions: this.listTaskFunctions(),