From: Jérôme Benoit Date: Mon, 20 Nov 2023 16:38:35 +0000 (+0100) Subject: refactor: more stricter type checking in condition X-Git-Tag: v1.2.26~24 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bc0f4d8f4973f36baa3f468848fe4d7af25c9a9c;p=e-mobility-charging-stations-simulator.git refactor: more stricter type checking in condition Signed-off-by: Jérôme Benoit --- 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 }); }