fix: ensure no null serialized values end in UI server response payload
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-server / ui-services / AbstractUIService.ts
index d7595c26db164589e1cfb807812fab72be7a3c0b..d0478b99573c2da29de611e05dba6a737bf21d84 100644 (file)
@@ -163,7 +163,7 @@ export abstract class AbstractUIService {
     if (isNotEmptyArray(payload.hashIds)) {
       payload.hashIds = payload.hashIds
         ?.map((hashId) => {
-          if (this.uiServer.chargingStations.has(hashId) === true) {
+          if (hashId !== undefined && this.uiServer.chargingStations.has(hashId) === true) {
             return hashId;
           }
           const msg = `${this.logPrefix(