Skip to content

Commit

Permalink
refactor: fix dependencyDataProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
mamilic committed Oct 28, 2024
1 parent ecced17 commit 234105e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/views/dependencyDataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ export class DependencyDataProvider implements TreeDataProvider<ExplorerNode> {
const children = (!this._rootItems || !element) ?
await this.getRootNodes() : await element.getChildren();

if (children) {
children.sort((a, b) => {
return a.getDisplayName().localeCompare(b.getDisplayName());
});
if (children && element instanceof ContainerNode) {
if (element.isMavenType()) {
children.sort((a, b) => {
return a.getDisplayName().localeCompare(b.getDisplayName());
});
}
}

explorerNodeCache.saveNodes(children || []);
Expand Down

0 comments on commit 234105e

Please sign in to comment.