repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps): apply updates
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
ChargingStationWorkerBroadcastChannel.ts
diff --git
a/src/charging-station/ChargingStationWorkerBroadcastChannel.ts
b/src/charging-station/ChargingStationWorkerBroadcastChannel.ts
index 49ce0811d534be1e339c466a2b839132749235e3..c03c4acb81db8aae2a01efee281e5558fbfb3a81 100644
(file)
--- a/
src/charging-station/ChargingStationWorkerBroadcastChannel.ts
+++ b/
src/charging-station/ChargingStationWorkerBroadcastChannel.ts
@@
-258,12
+258,12
@@
export class ChargingStationWorkerBroadcastChannel extends WorkerBroadcastChanne
}
const [uuid, command, requestPayload] = validatedMessageEvent.data as BroadcastChannelRequest;
if (
}
const [uuid, command, requestPayload] = validatedMessageEvent.data as BroadcastChannelRequest;
if (
-
requestPayload?.hashIds !== undefined
&&
+
!Utils.isNullOrUndefined(requestPayload?.hashIds)
&&
requestPayload?.hashIds?.includes(this.chargingStation.stationInfo.hashId) === false
) {
return;
}
requestPayload?.hashIds?.includes(this.chargingStation.stationInfo.hashId) === false
) {
return;
}
- if (
requestPayload?.hashId !== undefined
) {
+ if (
!Utils.isNullOrUndefined(requestPayload?.hashId)
) {
logger.error(
`${this.chargingStation.logPrefix()} ${moduleName}.requestHandler: 'hashId' field usage in PDU is deprecated, use 'hashIds' array instead`
);
logger.error(
`${this.chargingStation.logPrefix()} ${moduleName}.requestHandler: 'hashId' field usage in PDU is deprecated, use 'hashIds' array instead`
);
@@
-274,8
+274,7
@@
export class ChargingStationWorkerBroadcastChannel extends WorkerBroadcastChanne
try {
commandResponse = await this.commandHandler(command, requestPayload);
if (
try {
commandResponse = await this.commandHandler(command, requestPayload);
if (
- commandResponse === undefined ||
- commandResponse === null ||
+ Utils.isNullOrUndefined(commandResponse) ||
Utils.isEmptyObject(commandResponse as CommandResponse)
) {
responsePayload = {
Utils.isEmptyObject(commandResponse as CommandResponse)
) {
responsePayload = {