From: Jérôme Benoit Date: Wed, 10 Jan 2024 14:27:51 +0000 (+0100) Subject: fix: fix nullish exception X-Git-Tag: v1.2.32~42 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=73b78a1f75b27bc503f90269690ad71b70f4f2eb;p=e-mobility-charging-stations-simulator.git fix: fix nullish exception Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 3893d8be..1f2b1d78 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1779,7 +1779,7 @@ export class ChargingStation extends EventEmitter { this.stationInfo?.registrationMaxRetries !== -1 && ++registrationRetryCount await sleep( // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - this.bootNotificationResponse.interval != null + this.bootNotificationResponse?.interval != null ? secondsToMilliseconds(this.bootNotificationResponse.interval) : Constants.DEFAULT_BOOT_NOTIFICATION_INTERVAL )