refactor: cleanup persistent stationInfo tunable handling
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStation.ts
index 610c2d547ab960afd00b2421585f14820d513369..02200e4114a101a512374bbbb1432c857c607069 100644 (file)
@@ -1133,7 +1133,7 @@ export class ChargingStation extends EventEmitter {
   }
 
   private getStationInfoFromFile(
-    stationInfoPersistentConfiguration: boolean,
+    stationInfoPersistentConfiguration = true,
   ): ChargingStationInfo | undefined {
     let stationInfo: ChargingStationInfo | undefined;
     if (stationInfoPersistentConfiguration === true) {
@@ -1171,7 +1171,7 @@ export class ChargingStation extends EventEmitter {
     };
     const stationInfoFromTemplate: ChargingStationInfo = this.getStationInfoFromTemplate();
     const stationInfoFromFile: ChargingStationInfo | undefined = this.getStationInfoFromFile(
-      stationInfoFromTemplate?.stationInfoPersistentConfiguration ?? true,
+      stationInfoFromTemplate?.stationInfoPersistentConfiguration,
     );
     // Priority:
     // 1. charging station info from template