From 3880dbcf93ed551112ce38ecb78b6631cb257976 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 4 Sep 2022 22:21:48 +0200 Subject: [PATCH] Strict boolean checks MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ChargingStationWorkerBroadcastChannel.ts | 2 +- src/charging-station/UIServiceWorkerBroadcastChannel.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) -- 2.34.1