X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStationWorker.ts;h=24ee468c0a5cc1244cd52890fc279d07fde70df7;hb=a4e5c2e2fc622bd263b8bd3595c37abfd0669a25;hp=0ae95a618913e724eaab7c0dd8d509d4590b0e8c;hpb=42486f2357b011f9244c6b29f4e05185138ce8d1;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStationWorker.ts b/src/charging-station/ChargingStationWorker.ts index 0ae95a61..24ee468c 100644 --- a/src/charging-station/ChargingStationWorker.ts +++ b/src/charging-station/ChargingStationWorker.ts @@ -6,7 +6,7 @@ import { ThreadWorker } from 'poolifier'; import { ChargingStation } from './ChargingStation'; import type { ChargingStationWorkerData } from '../types'; -import { Configuration, Utils } from '../utils'; +import { Configuration } from '../utils'; import { WorkerConstants, type WorkerMessage, WorkerMessageEvents } from '../worker'; /** @@ -40,7 +40,7 @@ if (Configuration.workerPoolInUse()) { } else { // Add message listener to start charging station from main thread addMessageListener(); - if (Utils.isUndefined(workerData) === false) { + if (workerData !== undefined) { startChargingStation(workerData as ChargingStationWorkerData); } }