build(simulator): switch to strict type checking
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-server / UIHttpServer.ts
index cb02d4a54101fd75b8962cee4586bc7b4622eb0d..103a27aed75c163ef7481035ae2eef681ac6b81a 100644 (file)
@@ -132,9 +132,9 @@ export class UIHttpServer extends AbstractUIServer {
                   body ?? Constants.EMPTY_FREEZED_OBJECT,
                 ),
               )
-              .then((protocolResponse: ProtocolResponse) => {
+              .then((protocolResponse: ProtocolResponse | undefined) => {
                 if (!isNullOrUndefined(protocolResponse)) {
-                  this.sendResponse(protocolResponse);
+                  this.sendResponse(protocolResponse!);
                 }
               })
               .catch(Constants.EMPTY_FUNCTION);