From f7b80baee8fc2e359aea66b3f624439c4906a716 Mon Sep 17 00:00:00 2001 From: Sheng Chen Date: Wed, 19 Aug 2020 09:56:38 +0800 Subject: [PATCH] bugfix: Refresh the explorer correctly when it has default package (#307) --- src/views/nodeCache/explorerNodeCache.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/nodeCache/explorerNodeCache.ts b/src/views/nodeCache/explorerNodeCache.ts index d0fda216..b7fbc91d 100644 --- a/src/views/nodeCache/explorerNodeCache.ts +++ b/src/views/nodeCache/explorerNodeCache.ts @@ -27,7 +27,9 @@ class ExplorerNodeCache { } public saveNode(node: ExplorerNode): void { - if (node instanceof DataNode && node.uri) { + // default package has the same uri as the root package, + // we skip default package and store the root package here. + if (node instanceof DataNode && node.uri && node.name !== "default-package") { this.mutableNodeCache.insert(node); } }