diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f0d147..59bf85a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Also remaps `Show SCM` to `Ctrl+Shift+G G` since by default it is `Ctrl+Shift+G` if the `chorded` keymap is used ### Fixed +- Fixes [#252](https://github.com/eamodio/vscode-gitlens/issues/252) - Cannot read property 'push' of undefined - Fixes issue where GitLens wouldn't detect the creation of a Git repository if there were no other repositories open - Fixes issue where some GitLens commands would show in the palette even though there was no repository diff --git a/src/views/statusNode.ts b/src/views/statusNode.ts index b4ebb07..e95cc6e 100644 --- a/src/views/statusNode.ts +++ b/src/views/statusNode.ts @@ -20,10 +20,10 @@ export class StatusNode extends ExplorerNode { async getChildren(): Promise { this.resetChildren(); - this.children = []; - const status = await this.repo.getStatus(); - if (status === undefined) return this.children; + if (status === undefined) return []; + + this.children = []; if (status.state.behind) { this.children.push(new StatusUpstreamNode(status, 'behind', this.explorer));