From bbc6c09253da8c84496ef229c27c404a1d69ebfb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 29 Aug 2022 21:32:00 +0200 Subject: [PATCH] Cleanup Array.from() usage MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/MessageChannelUtils.ts | 2 +- src/charging-station/ui-server/ui-services/AbstractUIService.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/charging-station/MessageChannelUtils.ts b/src/charging-station/MessageChannelUtils.ts index 2371dd3d..9a88d172 100644 --- a/src/charging-station/MessageChannelUtils.ts +++ b/src/charging-station/MessageChannelUtils.ts @@ -55,7 +55,7 @@ export class MessageChannelUtils { stationInfo: chargingStation.stationInfo, stopped: chargingStation.stopped, bootNotificationResponse: chargingStation.bootNotificationResponse, - connectors: Array.from(chargingStation.connectors.values()).map( + connectors: [...chargingStation.connectors.values()].map( // eslint-disable-next-line @typescript-eslint/no-unused-vars ({ transactionSetInterval, ...connectorStatusRest }) => connectorStatusRest ), diff --git a/src/charging-station/ui-server/ui-services/AbstractUIService.ts b/src/charging-station/ui-server/ui-services/AbstractUIService.ts index e72af5c0..1e0f2a92 100644 --- a/src/charging-station/ui-server/ui-services/AbstractUIService.ts +++ b/src/charging-station/ui-server/ui-services/AbstractUIService.ts @@ -118,7 +118,7 @@ export default abstract class AbstractUIService { // TODO: remove cast to unknown return { status: ResponseStatus.SUCCESS, - ...Array.from(this.uiServer.chargingStations.values()), + ...[...this.uiServer.chargingStations.values()], } as unknown as ResponsePayload; } -- 2.34.1