Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Mar 13, 2018
1 parent 11a262e commit 5478bd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vs/workbench/browser/parts/views/customView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class CustomTreeViewer extends Disposable implements ITreeViewer {
onDidChange = dataProvider.onDidChange;
onDispose = dataProvider.onDispose;
getChildren(node?: ITreeItem): TPromise<ITreeItem[]> {
if (node.children) {
if (node && node.children) {
return TPromise.as(node.children);
}
const promise = node instanceof Root ? dataProvider.getChildren() : dataProvider.getChildren(node);
Expand Down Expand Up @@ -464,7 +464,7 @@ class Aligner extends Disposable {
if (this.hasIcon(parent)) {
return false;
}
return parent.children.every(c => c.collapsibleState === TreeItemCollapsibleState.None || !this.hasIcon(c));
return parent.children && parent.children.every(c => c.collapsibleState === TreeItemCollapsibleState.None || !this.hasIcon(c));
}

private hasIcon(node: ITreeItem): boolean {
Expand Down

0 comments on commit 5478bd9

Please sign in to comment.