From: Jérôme Benoit Date: Fri, 28 Apr 2023 12:25:35 +0000 (+0200) Subject: fix: fix number of available evses calculation X-Git-Tag: v1.2.12~54 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=007b5bdeabda751743fdff8faac672b3ec57fb61;p=e-mobility-charging-stations-simulator.git fix: fix number of available evses calculation Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 6ea862e7..70f511e0 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -263,11 +263,11 @@ export class ChargingStation { } return numberOfConnectors; } - return this.connectors.get(0) ? this.connectors.size - 1 : this.connectors.size; + return this.connectors.has(0) ? this.connectors.size - 1 : this.connectors.size; } public getNumberOfEvses(): number { - return this.evses.size; + return this.evses.has(0) ? this.evses.size - 1 : this.evses.size; } public getConnectorStatus(connectorId: number): ConnectorStatus | undefined {