Skip to content

Commit

Permalink
fix(react/theme): correct the check for empty cssVariables to avoid…
Browse files Browse the repository at this point in the history
… logical errors
  • Loading branch information
cheton committed Dec 5, 2024
1 parent edc8823 commit 3b52306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/theme/CSSVariables.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const CSSVariables = () => {
const styles = useCallback((theme) => {
const rootSelector = theme?.rootSelector;
const cssVariables = ensurePlainObject(theme?.cssVariables);
if (!rootSelector || Object.keys(cssVariables) === 0) {
if (!rootSelector || Object.keys(cssVariables).length === 0) {
return {};
}
return {
Expand Down

0 comments on commit 3b52306

Please sign in to comment.