Skip to content

Commit

Permalink
Use all the type hierarchy levels the server sends (fixes #4540)
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Ridge <[email protected]>
  • Loading branch information
HighCommander4 authored and uniibu committed Mar 21, 2019
1 parent 31c9367 commit 0fe4636
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/typehierarchy/src/browser/tree/typehierarchy-tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ export namespace TypeHierarchyTree {

export function create(item: TypeHierarchyItem, direction: TypeHierarchyDirection, resolved: boolean = true): Node {
const items = TypeHierarchyDirection.Children === direction ? item.children : item.parents;
if (items && items.length > 0) {
// If the server sent more levels than requested, use them.
resolved = true;
}
const node = {
id: v4(),
name: item.name,
Expand Down

0 comments on commit 0fe4636

Please sign in to comment.