From: Jérôme Benoit Date: Sun, 11 Sep 2022 15:33:52 +0000 (+0200) Subject: Strict boolean checks X-Git-Tag: v1.1.73~9 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=95bdbf129c08a17acc369d35b7eccfbd7b0aa977;p=e-mobility-charging-stations-simulator.git Strict boolean checks Signed-off-by: Jérôme Benoit --- 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)