Skip to content

Commit

Permalink
fix error when window.activeTextEditor is undefined (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flanker32 authored and andxu committed Dec 21, 2018
1 parent a65330d commit 2af035c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/views/dependencyExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ export class DependencyExplorer {
});

this._dataProvider.onDidChangeTreeData(() => {
const currentDocument = window.activeTextEditor.document.uri;
if (currentDocument) {
this.reveal(currentDocument);
if (window.activeTextEditor) {
this.reveal(window.activeTextEditor.document.uri);
}
});
}
Expand Down

0 comments on commit 2af035c

Please sign in to comment.