fix: ensure configuration keys are saved with the right data structure
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 23 Nov 2023 21:31:41 +0000 (22:31 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 23 Nov 2023 21:31:41 +0000 (22:31 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts

index 988dc5807aed556c5de54f3c6da1cdb20439362f..6fa98484649e97de62a35495d339dc0cec09b620 100644 (file)
@@ -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;
         }