Skip to content

Commit

Permalink
Fix for a wrong condition
Browse files Browse the repository at this point in the history
  • Loading branch information
AlemTuzlak committed Aug 22, 2024
1 parent 695bf3c commit 78c4d8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "storyblok-generator",
"version": "1.0.3",
"version": "1.0.4",
"description": "Generate Storyblok components out of your components.json file and get full type-safety and bundle splitting out of the box",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ const generateComponents = async ({
fileName: componentFileName,
}

if ((await componentExists(componentFile)) && debug) {
log(`⚠️ Component ${chalk.yellow(componentName)} already exists. Skipping...`)
if (await componentExists(componentFile)) {
if (debug) {
log(`⚠️ Component ${chalk.yellow(componentName)} already exists. Skipping...`)
}
return returnData
}
const hasBody = component?.schema?.body
Expand Down

0 comments on commit 78c4d8d

Please sign in to comment.