X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Fbroadcast-channel%2FChargingStationWorkerBroadcastChannel.ts;h=10d0c75c3aff0ad88776f0d76a2fb80cca665c5e;hb=61e7211fc5ffba826712773b685cb06f9cd9a2a6;hp=89f828b5a266bb7e57bf2ce0e669e108976f87b4;hpb=ae2f7bc017445da9af276d1d120a8d0a9dfc1faa;p=e-mobility-charging-stations-simulator.git 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