Skip to content

Commit 779517a

Browse files
authored
fix(shadcn): check for empty css vars (#6733)
* fix(shadcn): check for empty css vars * chore: changeset
1 parent b567f7a commit 779517a

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/shaggy-months-tease.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"shadcn": patch
3+
---
4+
5+
check for empty css vars

packages/shadcn/src/utils/updaters/update-css-vars.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export async function updateCssVars(
2424
tailwindConfig?: z.infer<typeof registryItemTailwindSchema>["config"]
2525
}
2626
) {
27-
if (!config.resolvedPaths.tailwindCss) {
27+
if (!config.resolvedPaths.tailwindCss || !Object.keys(cssVars ?? {}).length) {
2828
return
2929
}
3030

0 commit comments

Comments
 (0)