refactor: remove unneeded backward compatibility code
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 7 Aug 2023 22:27:51 +0000 (00:27 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 7 Aug 2023 22:27:51 +0000 (00:27 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts

index 1e3cebf513b6570f4e1af8bf4c8efe064a5e5516..b037bc3098283339c97fd82b663c0d70ed18acd3 100644 (file)
@@ -364,11 +364,7 @@ export class ChargingStation {
   }
 
   public getMaximumPower(stationInfo?: ChargingStationInfo): number {
-    const localStationInfo = stationInfo ?? this.stationInfo;
-    return (
-      (localStationInfo?.['maxPower' as keyof ChargingStationInfo] as number) ??
-      localStationInfo.maximumPower
-    );
+    return (stationInfo ?? this.stationInfo).maximumPower!;
   }
 
   public getConnectorMaximumAvailablePower(connectorId: number): number {