Skip to content

Commit 6c081d4

Browse files
author
Dufour Marquez, Carl
committed
Fixed bug with styled-system to prevent undefined properties (issue styled-components#94)
1 parent 32b8b88 commit 6c081d4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils/flatten.js

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import hyphenateStyleName from './hyphenateStyleName'
44
export const objToCss = (obj, prevKey) => {
55
const css = Object.keys(obj).map(key => {
66
if (isPlainObject(obj[key])) return objToCss(obj[key], key)
7+
if (typeof obj[key] !== 'undefined') return
78
return `${hyphenateStyleName(key)}: ${obj[key]};`
89
}).join(' ')
910
return prevKey ? `${prevKey} {

0 commit comments

Comments
 (0)