Skip to content

Commit 3e36d9d

Browse files
authored
bugfix: Wrong package created under the default package (#306)
1 parent 2fce0bb commit 3e36d9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/explorerCommands/new.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function getNewFilePath(basePath: string, className: string): string {
4949
export async function newPackage(node: DataNode): Promise<void> {
5050
let defaultValue: string;
5151
let packageRootPath: string;
52-
if (node.nodeData.kind === NodeKind.PackageRoot) {
52+
if (node.nodeData.kind === NodeKind.PackageRoot || node.name === "default-package") {
5353
defaultValue = "";
5454
packageRootPath = Uri.parse(node.uri).fsPath;
5555
} else if (node.nodeData.kind === NodeKind.Package) {

0 commit comments

Comments
 (0)