From: Jérôme Benoit Date: Sat, 11 Nov 2023 10:02:54 +0000 (+0100) Subject: fix: strict condition on boolean X-Git-Tag: v1.2.24~15 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=be1e907c6de583ad192c9566943252bbde19aa51;p=e-mobility-charging-stations-simulator.git fix: strict condition on boolean Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 4525b8b7..cd1ec426 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -2037,7 +2037,7 @@ export class ChargingStation extends EventEmitter { private getPowerDivider(): number { let powerDivider = this.hasEvses ? this.getNumberOfEvses() : this.getNumberOfConnectors(); - if (this.stationInfo?.powerSharedByConnectors) { + if (this.stationInfo?.powerSharedByConnectors === true) { powerDivider = this.getNumberOfRunningTransactions(); } return powerDivider; diff --git a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts index 74312465..edec1e4e 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts @@ -755,7 +755,7 @@ export class OCPP16ResponseService extends OCPPResponseService { requestPayload.transactionId } STOPPED on ${ chargingStation.stationInfo.chargingStationId - }#${transactionConnectorId} with status '${payload.idTagInfo?.status ?? 'undefined'}'`; + }#${transactionConnectorId} with status '${payload.idTagInfo?.status}'`; if ( isNullOrUndefined(payload.idTagInfo) || payload.idTagInfo?.status === OCPP16AuthorizationStatus.ACCEPTED