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
Strict null check fixes
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
ui-server
/
ui-services
/
AbstractUIService.ts
diff --git
a/src/charging-station/ui-server/ui-services/AbstractUIService.ts
b/src/charging-station/ui-server/ui-services/AbstractUIService.ts
index 2b1267f35fd40b4584f29d87379782ebe3d419b7..1dd0ee274da3adb320134e66a4f3798dfe932ace 100644
(file)
--- a/
src/charging-station/ui-server/ui-services/AbstractUIService.ts
+++ b/
src/charging-station/ui-server/ui-services/AbstractUIService.ts
@@
-92,7
+92,7
@@
export default abstract class AbstractUIService {
// Log
logger.error(`${this.logPrefix(moduleName, 'messageHandler')} Handle request error:`, error);
responsePayload = {
// Log
logger.error(`${this.logPrefix(moduleName, 'messageHandler')} Handle request error:`, error);
responsePayload = {
- hashIds: requestPayload.hashIds,
+ hashIds: requestPayload
?
.hashIds,
status: ResponseStatus.FAILURE,
command,
requestPayload,
status: ResponseStatus.FAILURE,
command,
requestPayload,
@@
-156,7
+156,7
@@
export default abstract class AbstractUIService {
): void {
if (!Utils.isEmptyArray(payload.hashIds)) {
payload.hashIds = payload.hashIds
): void {
if (!Utils.isEmptyArray(payload.hashIds)) {
payload.hashIds = payload.hashIds
- .map(
hashId
=> {
+ .map(
(hashId)
=> {
if (this.uiServer.chargingStations.has(hashId) === true) {
return hashId;
}
if (this.uiServer.chargingStations.has(hashId) === true) {
return hashId;
}
@@
-167,7
+167,7
@@
export default abstract class AbstractUIService {
)} Charging station with hashId '${hashId}' not found`
);
})
)} Charging station with hashId '${hashId}' not found`
);
})
- .filter(
hashId
=> hashId !== undefined);
+ .filter(
(hashId)
=> hashId !== undefined);
}
const expectedNumberOfResponses = !Utils.isEmptyArray(payload.hashIds)
? payload.hashIds.length
}
const expectedNumberOfResponses = !Utils.isEmptyArray(payload.hashIds)
? payload.hashIds.length