Skip to content

Commit d574f3d

Browse files
committed
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.
1 parent 11b63f3 commit d574f3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/ql-vscode/src/interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ export class ResultsView extends AbstractWebview<
399399
forceReveal: WebviewReveal,
400400
shouldKeepOldResultsWhileRendering = false,
401401
): Promise<void> {
402-
if (!fullQuery.completedQuery.successful) {
402+
if (!fullQuery.completedQuery?.successful) {
403403
return;
404404
}
405405

0 commit comments

Comments
 (0)