From: Jérôme Benoit Date: Fri, 28 Jul 2023 19:39:59 +0000 (+0200) Subject: fix: fix integer check condition X-Git-Tag: v1.2.20~107 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f028efcac4512be662211c90b3fb2107f6830319;p=e-mobility-charging-stations-simulator.git fix: fix integer check condition Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/WorkerSet.ts b/src/worker/WorkerSet.ts index 0f820411..e0730678 100644 --- a/src/worker/WorkerSet.ts +++ b/src/worker/WorkerSet.ts @@ -41,7 +41,7 @@ export class WorkerSet extends WorkerAbstract { ) { throw new TypeError('Elements per worker is not defined'); } - if (Number.isSafeInteger(this.workerOptions.elementsPerWorker)) { + if (!Number.isSafeInteger(this.workerOptions.elementsPerWorker)) { throw new TypeError('Elements per worker must be an integer'); } if (this.workerOptions.elementsPerWorker <= 0) {