build(deps-dev): bump @types/node
[poolifier.git] / src / worker / abstract-worker.ts
index e10521fcbc7808eeffeb778aa8dfb13ce0eb680e..431354677c17b4da4f21035ba56b2e09ff98b34e 100644 (file)
@@ -405,7 +405,7 @@ export abstract class AbstractWorker<
   private checkMessageWorkerId (message: MessageValue<Data>): void {
     if (message.workerId == null) {
       throw new Error('Message worker id is not set')
-    } else if (message.workerId != null && message.workerId !== this.id) {
+    } else if (message.workerId !== this.id) {
       throw new Error(
         `Message worker id ${message.workerId} does not match the worker id ${this.id}`
       )