From: Jérôme Benoit Date: Thu, 23 Nov 2023 20:46:09 +0000 (+0100) Subject: refactor: cleanup persistent stationInfo tunable handling X-Git-Tag: v1.2.26~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=15af2feb2facd029a64f005074db43cdb175e69c;p=e-mobility-charging-stations-simulator.git refactor: cleanup persistent stationInfo tunable handling Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 610c2d54..02200e41 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -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