Skip to content

Commit e8b4291

Browse files
committed
Fix collapsible state evaluating for children classes
1 parent 73a304f commit e8b4291

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/type-hierarchy.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,11 @@ class TypeHierarchyProvider implements
258258
await this.client.sendRequest(ResolveTypeHierarchyRequest.type, {
259259
item: element,
260260
direction: TypeHierarchyDirection.Children,
261-
resolve: 1
261+
resolve: 2 // We need 2 levels to understand which collapsible state to use
262262
});
263263
element.children = resolved?.children;
264+
// Cut-of existing sub-children to resolve them later
265+
element.children?.forEach(x => { if (x.children?.length !== 0) { x.children = undefined; } });
264266
}
265267
return element.children ?? [];
266268
}

0 commit comments

Comments
 (0)