feat: improve get composite schedule
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-server / UIWebSocketServer.ts
index b28b6df76f4d33e85ab2cf82178a86addfc6e94c..5651ab5a405f3d98c00f0688ff7f493ab7da8a71 100644 (file)
@@ -60,9 +60,9 @@ export class UIWebSocketServer extends AbstractUIServer {
         this.uiServices
           .get(version)
           ?.requestHandler(request)
-          .then((protocolResponse: ProtocolResponse) => {
+          .then((protocolResponse?: ProtocolResponse) => {
             if (!isNullOrUndefined(protocolResponse)) {
-              this.sendResponse(protocolResponse);
+              this.sendResponse(protocolResponse!);
             }
           })
           .catch(Constants.EMPTY_FUNCTION);