Skip to content

Commit 2af035c

Browse files
Flanker32andxu
authored andcommitted
fix error when window.activeTextEditor is undefined (#136)
1 parent a65330d commit 2af035c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/views/dependencyExplorer.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ export class DependencyExplorer {
3535
});
3636

3737
this._dataProvider.onDidChangeTreeData(() => {
38-
const currentDocument = window.activeTextEditor.document.uri;
39-
if (currentDocument) {
40-
this.reveal(currentDocument);
38+
if (window.activeTextEditor) {
39+
this.reveal(window.activeTextEditor.document.uri);
4140
}
4241
});
4342
}

0 commit comments

Comments
 (0)