Fix error while deleting query history item
When deleting a query history item and the "next" query is still running, the `completedQuery` is `undefined`. This commit fixes it by using optional chaining to ensure that the `completedQuery` is defined before accessing its `successful` property.
This commit is contained in:
@@ -399,7 +399,7 @@ export class ResultsView extends AbstractWebview<
|
||||
forceReveal: WebviewReveal,
|
||||
shouldKeepOldResultsWhileRendering = false,
|
||||
): Promise<void> {
|
||||
if (!fullQuery.completedQuery.successful) {
|
||||
if (!fullQuery.completedQuery?.successful) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user