Browse Source

Fixes undefined exception

main
Eric Amodio 6 years ago
parent
commit
c4d7de1978
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/views/gitExplorer.ts

+ 3
- 1
src/views/gitExplorer.ts View File

@ -202,7 +202,9 @@ export class GitExplorer extends Disposable implements TreeDataProvider
this.setRoot(await this.getRootNode(window.activeTextEditor)); this.setRoot(await this.getRootNode(window.activeTextEditor));
} }
this._root!.refresh();
if (this._root !== undefined) {
this._root.refresh();
}
this._onDidChangeTreeData.fire(); this._onDidChangeTreeData.fire();
} }

Loading…
Cancel
Save