diff --git a/editors/code/src/commands/syntax_tree.ts b/editors/code/src/commands/syntax_tree.ts index e443c5e5426..996c7a71697 100644 --- a/editors/code/src/commands/syntax_tree.ts +++ b/editors/code/src/commands/syntax_tree.ts @@ -98,7 +98,7 @@ class AstInspector implements vscode.HoverProvider, Disposable { } private onDidCloseTextDocument(doc: vscode.TextDocument) { - if (!!this.rustEditor && doc.uri.toString() === this.rustEditor.document.uri.toString()) { + if (this.rustEditor && doc.uri.toString() === this.rustEditor.document.uri.toString()) { this.setRustEditor(undefined); } }