Remove unneeded connexion URLs shallow copy
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 26 Dec 2022 19:39:06 +0000 (20:39 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 26 Dec 2022 19:39:06 +0000 (20:39 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts

index 20122c400d98d13857b368b974caa3ccf1c0c123..3f113359320723808ac546783e98b076bd658967 100644 (file)
@@ -1905,9 +1905,7 @@ export default class ChargingStation {
   }
 
   private getConfiguredSupervisionUrl(): URL {
-    const supervisionUrls = (
-      this.stationInfo.supervisionUrls ?? Configuration.getSupervisionUrls()
-    ).slice();
+    const supervisionUrls = this.stationInfo.supervisionUrls ?? Configuration.getSupervisionUrls();
     if (!Utils.isEmptyArray(supervisionUrls)) {
       switch (Configuration.getSupervisionUrlDistribution()) {
         case SupervisionUrlDistribution.ROUND_ROBIN: