refactor: switch to public static instead of setter in configuration
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStation.ts
index f84153922b1298cf39cd4555797f3a62cd066975..beefcf45025e334011d2f138267ec4eb85d2a05d 100644 (file)
@@ -1019,8 +1019,7 @@ export class ChargingStation {
   }
 
   private startReservationExpirationSetInterval(customInterval?: number): void {
-    const interval =
-      customInterval ?? Constants.DEFAULT_RESERVATION_EXPIRATION_OBSERVATION_INTERVAL;
+    const interval = customInterval ?? Constants.DEFAULT_RESERVATION_EXPIRATION_INTERVAL;
     if (interval > 0) {
       logger.info(
         `${this.logPrefix()} Reservation expiration date checks started every ${formatDurationMilliSeconds(
@@ -1034,7 +1033,7 @@ export class ChargingStation {
   }
 
   private stopReservationExpirationSetInterval(): void {
-    if (this.reservationExpirationSetInterval) {
+    if (!isNullOrUndefined(this.reservationExpirationSetInterval)) {
       clearInterval(this.reservationExpirationSetInterval);
     }
   }