fix: fix nullish exception
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 10 Jan 2024 14:27:51 +0000 (15:27 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 10 Jan 2024 14:27:51 +0000 (15:27 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts

index 3893d8be8754c4d3ef23ccfacf4166c9124bda90..1f2b1d7815154f172ccde1e35a93e3a172365c09 100644 (file)
@@ -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
             )