Skip to content

Commit

Permalink
fix(shadcn): check for empty css vars (#6733)
Browse files Browse the repository at this point in the history
* fix(shadcn): check for empty css vars

* chore: changeset
  • Loading branch information
shadcn authored Feb 22, 2025
1 parent b567f7a commit 779517a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/shaggy-months-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shadcn": patch
---

check for empty css vars
2 changes: 1 addition & 1 deletion packages/shadcn/src/utils/updaters/update-css-vars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function updateCssVars(
tailwindConfig?: z.infer<typeof registryItemTailwindSchema>["config"]
}
) {
if (!config.resolvedPaths.tailwindCss) {
if (!config.resolvedPaths.tailwindCss || !Object.keys(cssVars ?? {}).length) {
return
}

Expand Down

0 comments on commit 779517a

Please sign in to comment.