Strict boolean check in src/charging-station/UIServiceWorkerBroadcastChannel.ts
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 26 Sep 2022 21:25:03 +0000 (23:25 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 26 Sep 2022 21:25:03 +0000 (23:25 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/UIServiceWorkerBroadcastChannel.ts

index 5139b678c2d47ea168c495a3afbf264f7a62d517..e323056cd2c6456b8eb0f83759a30a2cbf473a4b 100644 (file)
@@ -59,11 +59,12 @@ export default class UIServiceWorkerBroadcastChannel extends WorkerBroadcastChan
   }
 
   private buildResponsePayload(uuid: string): ResponsePayload {
-    const responsesStatus = this.responses
-      .get(uuid)
-      ?.responses.every(({ status }) => status === ResponseStatus.SUCCESS)
-      ? ResponseStatus.SUCCESS
-      : ResponseStatus.FAILURE;
+    const responsesStatus =
+      this.responses
+        .get(uuid)
+        ?.responses.every(({ status }) => status === ResponseStatus.SUCCESS) === true
+        ? ResponseStatus.SUCCESS
+        : ResponseStatus.FAILURE;
     return {
       status: responsesStatus,
       hashIdsSucceeded: this.responses