X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStationUtils.ts;h=51ea7931a0f9d55e22beefea195d496c151af8bc;hb=e843aa4048c6bfcad2d8e54763b649eda57dbcb3;hp=868d0adbf23970b8157ad9ca03256ec4eeaae533;hpb=f26233c0fd267bc2ef00636ca7531a0877bb5dbe;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStationUtils.ts b/src/charging-station/ChargingStationUtils.ts index 868d0adb..51ea7931 100644 --- a/src/charging-station/ChargingStationUtils.ts +++ b/src/charging-station/ChargingStationUtils.ts @@ -354,10 +354,10 @@ export const warnTemplateKeysDeprecation = ( logPrefix: string, templateFile: string, ) => { - const templateKeys: { key: string; deprecatedKey: string }[] = [ - { key: 'supervisionUrls', deprecatedKey: 'supervisionUrl' }, - { key: 'idTagsFile', deprecatedKey: 'authorizationFile' }, - { key: 'ocppStrictCompliance', deprecatedKey: 'payloadSchemaValidation' }, + const templateKeys: { deprecatedKey: string; key?: string }[] = [ + { deprecatedKey: 'supervisionUrl', key: 'supervisionUrls' }, + { deprecatedKey: 'authorizationFile', key: 'idTagsFile' }, + { deprecatedKey: 'payloadSchemaValidation', key: 'ocppStrictCompliance' }, ]; for (const templateKey of templateKeys) { warnDeprecatedTemplateKey( @@ -365,7 +365,7 @@ export const warnTemplateKeysDeprecation = ( templateKey.deprecatedKey, logPrefix, templateFile, - `Use '${templateKey.key}' instead`, + !isUndefined(templateKey.key) && `Use '${templateKey.key}' instead`, ); convertDeprecatedTemplateKey(stationTemplate, templateKey.deprecatedKey, templateKey.key); }