this.uiServices
.get(version)
?.requestHandler(request)
- .then((protocolResponse: ProtocolResponse | undefined) => {
+ .then((protocolResponse?: ProtocolResponse) => {
if (!isNullOrUndefined(protocolResponse)) {
this.sendResponse(protocolResponse!);
}
}
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,