): GetConfigurationResponse {
const configurationKey: OCPPConfigurationKey[] = [];
const unknownKey: string[] = [];
- if (
- chargingStation.ocppConfiguration?.configurationKey &&
- isUndefined(commandPayload.key) === true
- ) {
- for (const configuration of chargingStation.ocppConfiguration.configurationKey) {
+ if (isUndefined(commandPayload.key) === true) {
+ for (const configuration of chargingStation.ocppConfiguration!.configurationKey!) {
if (isUndefined(configuration.visible) === true) {
configuration.visible = true;
}
value: configuration.value,
});
}
- } else if (commandPayload.key && isNotEmptyArray(commandPayload.key) === true) {
- for (const key of commandPayload.key) {
+ } else if (isNotEmptyArray(commandPayload.key) === true) {
+ for (const key of commandPayload.key!) {
const keyFound = ChargingStationConfigurationUtils.getConfigurationKey(
chargingStation,
key,