Skip to content

Commit

Permalink
fix: rename error
Browse files Browse the repository at this point in the history
  • Loading branch information
winchesHe committed Mar 28, 2024
1 parent 57da5ab commit 9dfb069
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/actions/init-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ export async function initAction(projectName: string, options: InitActionOptions
/** ======================== Generate template ======================== */
if (template === 'app') {
await generateTemplate(APP_REPO);
renameTemplate(APP_DIR, projectName);
projectName && renameTemplate(APP_DIR, projectName);
} else if (template === 'pages') {
await generateTemplate(PAGES_REPO);
renameTemplate(PAGES_DIR, projectName);
projectName && renameTemplate(PAGES_DIR, projectName);
}
}

Expand Down

0 comments on commit 9dfb069

Please sign in to comment.