From 859099b6e7adaf9eeed2aa348921a23d7aa0bc7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 30 Jan 2024 21:25:46 +0100 Subject: [PATCH] refactor: cleanup UI service response MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../ChargingStationWorkerBroadcastChannel.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts b/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts index 89f828b5..10d0c75c 100644 --- a/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts +++ b/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts @@ -285,7 +285,6 @@ export class ChargingStationWorkerBroadcastChannel extends WorkerBroadcastChanne return } let responsePayload: BroadcastChannelResponsePayload | undefined - let commandResponse: CommandResponse | undefined this.commandHandler(command, requestPayload) .then(commandResponse => { if (commandResponse == null || isEmptyObject(commandResponse)) { @@ -311,12 +310,10 @@ export class ChargingStationWorkerBroadcastChannel extends WorkerBroadcastChanne status: ResponseStatus.FAILURE, command, requestPayload, - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - commandResponse: commandResponse!, errorMessage: (error as OCPPError).message, errorStack: (error as OCPPError).stack, errorDetails: (error as OCPPError).details - } + } satisfies BroadcastChannelResponsePayload }) .finally(() => { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- 2.34.1