From: Jérôme Benoit Date: Tue, 5 Sep 2023 22:10:35 +0000 (+0200) Subject: refactor: use helper for null in undefined in condition X-Git-Tag: v1.2.21~27 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d116b9b5f418a020bc6f971580a23a04cdf8497a;p=e-mobility-charging-stations-simulator.git refactor: use helper for null in undefined in condition Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index d9f548d7..beefcf45 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1033,7 +1033,7 @@ export class ChargingStation { } private stopReservationExpirationSetInterval(): void { - if (this.reservationExpirationSetInterval) { + if (!isNullOrUndefined(this.reservationExpirationSetInterval)) { clearInterval(this.reservationExpirationSetInterval); } }