- if (!isUndefined(template?.[deprecatedKey as keyof ChargingStationTemplate])) {
- if (!isUndefined(key)) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- (template as unknown as Record<string, unknown>)[key!] =
+ if (template?.[deprecatedKey as keyof ChargingStationTemplate] !== undefined) {
+ if (key !== undefined) {
+ (template as unknown as Record<string, unknown>)[key] =