From fa9bcef2596007f2ff9a7706aedefbb6c097c397 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 21 Oct 2020 00:13:56 +0200 Subject: [PATCH] Move attributes init to the right place. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ChargingStation.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/charging-station/ChargingStation.js b/src/charging-station/ChargingStation.js index 03ad43c3..2c699be8 100644 --- a/src/charging-station/ChargingStation.js +++ b/src/charging-station/ChargingStation.js @@ -14,6 +14,7 @@ class ChargingStation { constructor(index, stationTemplateFile) { this._index = index; this._stationTemplateFile = stationTemplateFile; + this._connectors = {}; this._initialize(); this._isSocketRestart = false; @@ -70,9 +71,6 @@ class ChargingStation { // FIXME: Handle shrinking the number of connectors if (!this._connectors || (this._connectors && this._connectorsConfigurationHash !== connectorsConfigHash)) { this._connectorsConfigurationHash = connectorsConfigHash; - if (!this._connectors) { - this._connectors = {}; - } // Determine number of customized connectors let lastConnector; for (lastConnector in connectorsConfig) { -- 2.34.1