Skip to content

Commit 866b07d

Browse files
committed
Check theme[key] is a string
1 parent 56766fb commit 866b07d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/themr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default (componentName, localTheme, options = DEFAULT_OPTIONS) => (Themed
6060
function themeable(style = {}, theme) {
6161
if (!theme) return style
6262
return [ ...Object.keys(theme), ...Object.keys(style) ].reduce((result, key) => (
63-
theme[key] && style[key] && theme[key].indexOf(style[key]) === -1
63+
typeof theme[key] === 'string' && style[key] && theme[key].indexOf(style[key]) === -1
6464
? { ...result, [key]: `${style[key]} ${theme[key]}` }
6565
: { ...result, [key]: theme[key] || style[key] }
6666
), {})

0 commit comments

Comments
 (0)