More strict boolean checks
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 3 Oct 2022 11:32:55 +0000 (13:32 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 3 Oct 2022 11:32:55 +0000 (13:32 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts

index 7b98ed35858bd4c524cccb1af9222c0100e3922b..959b6c2c506d471829c3e018bca5deb4f9c714ef 100644 (file)
@@ -707,9 +707,9 @@ export default class ChargingStation {
   ): Promise<StopTransactionResponse> {
     const transactionId = this.getConnectorStatus(connectorId).transactionId;
     if (
-      this.getBeginEndMeterValues() &&
-      this.getOcppStrictCompliance() &&
-      !this.getOutOfOrderEndMeterValues()
+      this.getBeginEndMeterValues() === true &&
+      this.getOcppStrictCompliance() === true &&
+      this.getOutOfOrderEndMeterValues() === false
     ) {
       // FIXME: Implement OCPP version agnostic helpers
       const transactionEndMeterValue = OCPP16ServiceUtils.buildTransactionEndMeterValue(