Skip to content

Commit

Permalink
fix #50726
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed May 30, 2018
1 parent 892194d commit 42ab601
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,17 @@ export class OutlineDataSource implements IDataSource {
return element.id;
}

hasChildren(tree: ITree, element: TreeElement): boolean {
hasChildren(tree: ITree, element: OutlineModel | OutlineGroup | OutlineElement): boolean {
if (element instanceof OutlineModel) {
return true;
}
if (element instanceof OutlineElement && !element.score) {
return false;
}
for (const _ in element.children) {
return true;
for (const id in element.children) {
if (element.children[id].score) {
return true;
}
}
return false;
}
Expand Down

0 comments on commit 42ab601

Please sign in to comment.