Strict boolean checks
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 4 Sep 2022 20:21:48 +0000 (22:21 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 4 Sep 2022 20:21:48 +0000 (22:21 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStationWorkerBroadcastChannel.ts
src/charging-station/UIServiceWorkerBroadcastChannel.ts

index 086278784cb5eb7b1f1e53286207c6d41314d03e..a31d9779dff7b841bba18c31816ccb1c87c14929 100644 (file)
@@ -34,7 +34,7 @@ export default class ChargingStationWorkerBroadcastChannel extends WorkerBroadca
   }
 
   private async requestHandler(messageEvent: MessageEvent): Promise<void> {
-    if (this.isResponse(messageEvent.data)) {
+    if (this.isResponse(messageEvent.data) === true) {
       return;
     }
     const [uuid, command, requestPayload] = this.validateMessageEvent(messageEvent)
index e7615e611e30f3b7f895bb06caf14dff79fe0645..c556b26c8ccacf1f5b21b80c9e7afe2accbc235d 100644 (file)
@@ -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)