From 234105e293ff38fbbdc52130991e128598e7c939 Mon Sep 17 00:00:00 2001 From: Marko Milic Date: Mon, 28 Oct 2024 07:32:43 +0100 Subject: [PATCH] refactor: fix dependencyDataProvider --- src/views/dependencyDataProvider.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/dependencyDataProvider.ts b/src/views/dependencyDataProvider.ts index 295cc208..12001be2 100644 --- a/src/views/dependencyDataProvider.ts +++ b/src/views/dependencyDataProvider.ts @@ -124,10 +124,12 @@ export class DependencyDataProvider implements TreeDataProvider { 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 || []);