Skip to content

Commit 1aae595

Browse files
authored
fix(create-vite): targetDir is empty fallback defaultTargetDir (#20199)
1 parent 4b77d00 commit 1aae595

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/create-vite/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ async function init() {
358358
placeholder: defaultTargetDir,
359359
})
360360
if (prompts.isCancel(projectName)) return cancel()
361-
targetDir = formatTargetDir(projectName as string)
361+
targetDir = formatTargetDir(projectName as string) || defaultTargetDir
362362
}
363363

364364
// 2. Handle directory if exist and not empty

0 commit comments

Comments
 (0)