Pārlūkot izejas kodu

Fixes #252 - Cannot read property 'push' of undefined

main
Eric Amodio pirms 6 gadiem
vecāks
revīzija
395da8e3de
2 mainītis faili ar 4 papildinājumiem un 3 dzēšanām
  1. +1
    -0
      CHANGELOG.md
  2. +3
    -3
      src/views/statusNode.ts

+ 1
- 0
CHANGELOG.md Parādīt failu

@ -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

+ 3
- 3
src/views/statusNode.ts Parādīt failu

@ -20,10 +20,10 @@ export class StatusNode extends ExplorerNode {
async getChildren(): Promise<ExplorerNode[]> {
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));

Notiek ielāde…
Atcelt
Saglabāt