From 27662cf1a1e6cf8f3ef2e567369b89454e038765 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 16 Dec 2023 17:58:21 +0100 Subject: [PATCH] refactor: cleanup null test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/worker/WorkerSet.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/worker/WorkerSet.ts b/src/worker/WorkerSet.ts index 17b5b6dd..047d03ad 100644 --- a/src/worker/WorkerSet.ts +++ b/src/worker/WorkerSet.ts @@ -30,10 +30,7 @@ export class WorkerSet extends WorkerAbstract { */ constructor(workerScript: string, workerOptions: WorkerOptions) { super(workerScript, workerOptions); - if ( - this.workerOptions.elementsPerWorker === null || - this.workerOptions.elementsPerWorker === undefined - ) { + if (this.workerOptions.elementsPerWorker == null) { throw new TypeError('Elements per worker is not defined'); } if (!Number.isSafeInteger(this.workerOptions.elementsPerWorker)) { -- 2.34.1