diff --git a/.changeset/shaggy-months-tease.md b/.changeset/shaggy-months-tease.md new file mode 100644 index 0000000000..eb292424f7 --- /dev/null +++ b/.changeset/shaggy-months-tease.md @@ -0,0 +1,5 @@ +--- +"shadcn": patch +--- + +check for empty css vars diff --git a/packages/shadcn/src/utils/updaters/update-css-vars.ts b/packages/shadcn/src/utils/updaters/update-css-vars.ts index b9edf25011..f5bf416dfe 100644 --- a/packages/shadcn/src/utils/updaters/update-css-vars.ts +++ b/packages/shadcn/src/utils/updaters/update-css-vars.ts @@ -24,7 +24,7 @@ export async function updateCssVars( tailwindConfig?: z.infer["config"] } ) { - if (!config.resolvedPaths.tailwindCss) { + if (!config.resolvedPaths.tailwindCss || !Object.keys(cssVars ?? {}).length) { return }