fix: fix worker configuration merge issue
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStation.ts
index 29aedcbae2bbb1ee7ee66b23432c27359483cf66..92b5fe753a34efceb03334364a0a67b2aa44e91c 100644 (file)
@@ -1244,7 +1244,7 @@ export class ChargingStation extends EventEmitter {
       stationInfoFromFile.templateHash === stationInfoFromTemplate.templateHash
     ) {
       return setChargingStationOptions(
-        { ...Constants.DEFAULT_STATION_INFO, ...stationInfoFromFile },
+        mergeDeepRight(Constants.DEFAULT_STATION_INFO, stationInfoFromFile),
         options
       )
     }
@@ -1255,7 +1255,7 @@ export class ChargingStation extends EventEmitter {
         stationInfoFromTemplate
       )
     return setChargingStationOptions(
-      { ...Constants.DEFAULT_STATION_INFO, ...stationInfoFromTemplate },
+      mergeDeepRight(Constants.DEFAULT_STATION_INFO, stationInfoFromTemplate),
       options
     )
   }