Skip to content

Commit 45a2fef

Browse files
authored
bugfix: Cannot show types from default package in empty named root (#319)
1 parent 76f18df commit 45a2fef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/views/projectNode.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { ExplorerNode } from "./explorerNode";
1414
import { HierarchicalPackageNode } from "./hierarchicalPackageNode";
1515
import { NodeFactory } from "./nodeFactory";
1616
import { PackageNode } from "./packageNode";
17+
import { PrimaryTypeNode } from "./PrimaryTypeNode";
1718

1819
export class ProjectNode extends DataNode {
1920

@@ -91,6 +92,12 @@ export class ProjectNode extends DataNode {
9192
// Invisible project may have an empty named package root, in that case,
9293
// we will skip it.
9394
packageData.push(data);
95+
} else if (data.kind === NodeKind.PrimaryType) {
96+
// For invisible project with empty named package root with a default package,
97+
// types will be the project node's children
98+
if (data.metaData && data.metaData[PrimaryTypeNode.K_TYPE_KIND]) {
99+
result.push(new PrimaryTypeNode(data, this));
100+
}
94101
}
95102
});
96103
}

0 commit comments

Comments
 (0)