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);
}
public sendResponse(response: ProtocolResponse): void {
- const responseId = response[0];
+ const responseId = response?.[0];
try {
if (this.hasResponseHandler(responseId)) {
const ws = this.responseHandlers.get(responseId) as WebSocket;
return false;
}
- if (validateUUID(request[0]) === false) {
+ if (validateUUID(request?.[0]) === false) {
logger.error(
`${this.logPrefix(
moduleName,