From: Jérôme Benoit Date: Thu, 23 Nov 2023 21:31:41 +0000 (+0100) Subject: fix: ensure configuration keys are saved with the right data structure X-Git-Tag: v1.2.26~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=755a76d5aeb7164b82c392048c11d401f99aad81;p=e-mobility-charging-stations-simulator.git fix: ensure configuration keys are saved with the right data structure Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 988dc580..6fa98484 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1640,9 +1640,9 @@ export class ChargingStation extends EventEmitter { } if ( this.stationInfo?.ocppPersistentConfiguration === true && - this.ocppConfiguration?.configurationKey + Array.isArray(this.ocppConfiguration?.configurationKey) ) { - configurationData.configurationKey = this.ocppConfiguration.configurationKey; + configurationData.configurationKey = this.ocppConfiguration?.configurationKey; } else { delete configurationData.configurationKey; }