From bc0f4d8f4973f36baa3f468848fe4d7af25c9a9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 20 Nov 2023 17:38:35 +0100 Subject: [PATCH] refactor: more stricter type checking in condition 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 6d4b45f3..0ab700a5 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1314,7 +1314,7 @@ export class ChargingStation extends EventEmitter { } else if ( this.stationInfo?.supervisionUrlOcppConfiguration === false && isNotEmptyString(this.stationInfo?.supervisionUrlOcppKey) && - getConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey!) + !isNullOrUndefined(getConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey!)) ) { deleteConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey!, { save: false }); } -- 2.34.1