build(simulator): switch to strict type checking
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-server / UIWebSocketServer.ts
index b28b6df76f4d33e85ab2cf82178a86addfc6e94c..befb9854fa8a1a0d91e9daeff2a935eaa5634a0d 100644 (file)
@@ -60,9 +60,9 @@ export class UIWebSocketServer extends AbstractUIServer {
         this.uiServices
           .get(version)
           ?.requestHandler(request)
-          .then((protocolResponse: ProtocolResponse) => {
+          .then((protocolResponse: ProtocolResponse | undefined) => {
             if (!isNullOrUndefined(protocolResponse)) {
-              this.sendResponse(protocolResponse);
+              this.sendResponse(protocolResponse!);
             }
           })
           .catch(Constants.EMPTY_FUNCTION);