X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Fbroadcast-channel%2FUIServiceWorkerBroadcastChannel.ts;h=3a0c75b7d7e7ac19bce1cb255e320b7b4d35c5b0;hb=45a9839313c9bd8e81d61349bde0ea3bb69adf6a;hp=93586ceeee85a927e5fcbbea9f79b70cc2db59d7;hpb=a807045be19c1ed4996a44d8c2c8774e926dc6dc;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts b/src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts index 93586cee..3a0c75b7 100644 --- a/src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts +++ b/src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts @@ -6,7 +6,7 @@ import { type ResponsePayload, ResponseStatus } from '../../types/index.js' -import { isNullOrUndefined, logger } from '../../utils/index.js' +import { logger } from '../../utils/index.js' import type { AbstractUIService } from '../ui-server/ui-services/AbstractUIService.js' const moduleName = 'UIServiceWorkerBroadcastChannel' @@ -78,7 +78,7 @@ export class UIServiceWorkerBroadcastChannel extends WorkerBroadcastChannel { } return undefined }) - .filter((hashId) => !isNullOrUndefined(hashId)) as string[], + .filter(hashId => hashId != null) as string[], ...(responsesStatus === ResponseStatus.FAILURE && { hashIdsFailed: this.responses .get(uuid) @@ -88,18 +88,18 @@ export class UIServiceWorkerBroadcastChannel extends WorkerBroadcastChannel { } return undefined }) - .filter((hashId) => !isNullOrUndefined(hashId)) as string[] + .filter(hashId => hashId != null) as string[] }), ...(responsesStatus === ResponseStatus.FAILURE && { responsesFailed: this.responses .get(uuid) - ?.responses.map((response) => { - if (response != null && response.status === ResponseStatus.FAILURE) { + ?.responses.map(response => { + if (response.status === ResponseStatus.FAILURE) { return response } return undefined }) - .filter((response) => !isNullOrUndefined(response)) as BroadcastChannelResponsePayload[] + .filter(response => response != null) as BroadcastChannelResponsePayload[] }) } }