fix: fix integer check condition
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 28 Jul 2023 19:39:59 +0000 (21:39 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 28 Jul 2023 19:39:59 +0000 (21:39 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/worker/WorkerSet.ts

index 0f8204118afb3efad9158a78e23bea51e1247534..e07306784f120a6ccd6b83401b9d9dcc0e3d1fc3 100644 (file)
@@ -41,7 +41,7 @@ export class WorkerSet extends WorkerAbstract<WorkerData> {
     ) {
       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) {