refactor: use helper for null in undefined in condition
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 5 Sep 2023 22:10:35 +0000 (00:10 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 5 Sep 2023 22:10:35 +0000 (00:10 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts

index d9f548d71c47aa15ee55d4ebf32ccdbde5ffad91..beefcf45025e334011d2f138267ec4eb85d2a05d 100644 (file)
@@ -1033,7 +1033,7 @@ export class ChargingStation {
   }
 
   private stopReservationExpirationSetInterval(): void {
-    if (this.reservationExpirationSetInterval) {
+    if (!isNullOrUndefined(this.reservationExpirationSetInterval)) {
       clearInterval(this.reservationExpirationSetInterval);
     }
   }