From 95bdbf129c08a17acc369d35b7eccfbd7b0aa977 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 11 Sep 2022 17:33:52 +0200 Subject: [PATCH] Strict boolean checks MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ChargingStation.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 53f9076f..30c8cf77 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -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) -- 2.34.1