Strict boolean checks
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 11 Sep 2022 15:33:52 +0000 (17:33 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 11 Sep 2022 15:33:52 +0000 (17:33 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts

index 53f9076f00572e5aebe4fedfecf9d6e4a62e3849..30c8cf77bb971ee65a9e910fa2fbd1d8dc851001 100644 (file)
@@ -1569,7 +1569,8 @@ export default class ChargingStation {
           commandName ?? requestCommandName ?? null
         );
       } else if (
-        [MessageType.CALL_RESULT_MESSAGE, MessageType.CALL_ERROR_MESSAGE].includes(messageType)
+        [MessageType.CALL_RESULT_MESSAGE, MessageType.CALL_ERROR_MESSAGE].includes(messageType) ===
+        true
       ) {
         // Remove the request from the cache
         this.requests.delete(messageId);
@@ -1594,7 +1595,7 @@ export default class ChargingStation {
     connectorStatus: ConnectorStatus,
     meterStop = false
   ): number {
-    if (this.getMeteringPerTransaction()) {
+    if (this.getMeteringPerTransaction() === true) {
       return (
         (meterStop === true
           ? Math.round(connectorStatus?.transactionEnergyActiveImportRegisterValue)