From: Jérôme Benoit Date: Sun, 4 Sep 2022 20:21:48 +0000 (+0200) Subject: Strict boolean checks X-Git-Tag: v1.1.70~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=3880dbcf93ed551112ce38ecb78b6631cb257976;p=e-mobility-charging-stations-simulator.git Strict boolean checks Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStationWorkerBroadcastChannel.ts b/src/charging-station/ChargingStationWorkerBroadcastChannel.ts index 08627878..a31d9779 100644 --- a/src/charging-station/ChargingStationWorkerBroadcastChannel.ts +++ b/src/charging-station/ChargingStationWorkerBroadcastChannel.ts @@ -34,7 +34,7 @@ export default class ChargingStationWorkerBroadcastChannel extends WorkerBroadca } private async requestHandler(messageEvent: MessageEvent): Promise { - if (this.isResponse(messageEvent.data)) { + if (this.isResponse(messageEvent.data) === true) { return; } const [uuid, command, requestPayload] = this.validateMessageEvent(messageEvent) diff --git a/src/charging-station/UIServiceWorkerBroadcastChannel.ts b/src/charging-station/UIServiceWorkerBroadcastChannel.ts index e7615e61..c556b26c 100644 --- a/src/charging-station/UIServiceWorkerBroadcastChannel.ts +++ b/src/charging-station/UIServiceWorkerBroadcastChannel.ts @@ -29,7 +29,7 @@ export default class UIServiceWorkerBroadcastChannel extends WorkerBroadcastChan } private responseHandler(messageEvent: MessageEvent): void { - if (this.isRequest(messageEvent.data)) { + if (this.isRequest(messageEvent.data) === true) { return; } const [uuid, responsePayload] = this.validateMessageEvent(messageEvent)