Skip to content

Commit

Permalink
Fix falsy prop value handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Temzasse committed Jan 7, 2022
1 parent c0c4bba commit 82903ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/internals/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@ export function createStitches(config = {}) {
if (variants) {
variantStyles = Object.keys(variants)
.map((prop) => {
const propValue = props[prop] || defaultVariants[prop];
let propValue = props[prop];

if (propValue === undefined) {
propValue = defaultVariants[prop];
}

let styleSheetKey = '';

// Handle responsive prop value
Expand Down

0 comments on commit 82903ee

Please sign in to comment.