fs.mkdirSync(path.dirname(this.configurationFile), { recursive: true });
}
const configurationData: ChargingStationConfiguration =
- this.getConfigurationFromFile() ?? {};
+ Utils.cloneObject(this.getConfigurationFromFile()) ?? {};
this.ocppConfiguration?.configurationKey &&
(configurationData.configurationKey = this.ocppConfiguration.configurationKey);
this.stationInfo && (configurationData.stationInfo = this.stationInfo);
const configurationFromFile = this.getConfigurationFromFile();
configuration = configurationFromFile?.configurationKey && configurationFromFile;
}
- configuration && delete configuration.stationInfo;
+ if (!Utils.isNullOrUndefined(configuration)) {
+ delete configuration.stationInfo;
+ delete configuration.configurationHash;
+ }
return configuration;
}