From: Jérôme Benoit Date: Sat, 16 Dec 2023 16:58:21 +0000 (+0100) Subject: refactor: cleanup null test X-Git-Tag: v1.2.30~12 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=27662cf1a1e6cf8f3ef2e567369b89454e038765;p=e-mobility-charging-stations-simulator.git refactor: cleanup null test Signed-off-by: Jérôme Benoit --- 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)) {