Fix a type casting
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStationWorker.ts
index fb551a4565d82319cd07249b01cf7f6b65086ce2..514fba8c6811c9652133a70f9b882b9818c698b7 100644 (file)
@@ -23,10 +23,7 @@ if (Utils.workerPoolInUse()) {
   // Add message listener to start charging station from main thread
   addMessageListener();
   if (!Utils.isUndefined(workerData)) {
-    startChargingStation({
-      index: (workerData as ChargingStationWorkerData).index,
-      templateFile: (workerData as ChargingStationWorkerData).templateFile,
-    });
+    startChargingStation(workerData as ChargingStationWorkerData);
   }
 }