fix: strict condition on boolean
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 11 Nov 2023 10:02:54 +0000 (11:02 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 11 Nov 2023 10:02:54 +0000 (11:02 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts
src/charging-station/ocpp/1.6/OCPP16ResponseService.ts

index 4525b8b7a45736e0e791ca43fcff613eb6051a8a..cd1ec4268d27fc7a3f799a7c38e6f76439dc74df 100644 (file)
@@ -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;
index 7431246587c034610a98078ceffae3f927024543..edec1e4eb53f40bc62f93349d4e97db907637fad 100644 (file)
@@ -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