From: Jérôme Benoit Date: Sun, 11 Sep 2022 15:35:24 +0000 (+0200) Subject: Strict boolean check X-Git-Tag: v1.1.73~8 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bb83b5ed7e6b7070ba387ed9ef7d1e76acdfea27;p=e-mobility-charging-stations-simulator.git Strict boolean check Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 30c8cf77..17409e3a 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1205,7 +1205,7 @@ export default class ChargingStation { const lastConnectorId = Utils.convertToInt(lastConnector); if ( lastConnectorId === 0 && - this.getUseConnectorId0(stationInfo) && + this.getUseConnectorId0(stationInfo) === true && stationInfo?.Connectors[lastConnector] ) { this.connectors.set( @@ -1609,7 +1609,7 @@ export default class ChargingStation { ); } - private getUseConnectorId0(stationInfo?: ChargingStationInfo): boolean | undefined { + private getUseConnectorId0(stationInfo?: ChargingStationInfo): boolean { const localStationInfo = stationInfo ?? this.stationInfo; return !Utils.isUndefined(localStationInfo.useConnectorId0) ? localStationInfo.useConnectorId0