Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
);
if (!keyToChange) {
return OCPP16Constants.OCPP_CONFIGURATION_RESPONSE_NOT_SUPPORTED;
- } else if (keyToChange && keyToChange.readonly) {
+ } else if (keyToChange?.readonly === true) {
return OCPP16Constants.OCPP_CONFIGURATION_RESPONSE_REJECTED;
- } else if (keyToChange && !keyToChange.readonly) {
+ } else if (keyToChange?.readonly === false) {
let valueChanged = false;
if (keyToChange.value !== commandPayload.value) {
ChargingStationConfigurationUtils.setConfigurationKeyValue(
return value == null;
}
- public static isEmptyArray(object: unknown | unknown[]): boolean {
+ public static isEmptyArray(object: unknown): boolean {
return Array.isArray(object) && object.length === 0;
}
- public static isNotEmptyArray(object: unknown | unknown[]): boolean {
+ public static isNotEmptyArray(object: unknown): boolean {
return Array.isArray(object) && object.length > 0;
}