From 866b07d3b9379b4462134119d68209c19b584ebf Mon Sep 17 00:00:00 2001 From: Bao Dang Date: Tue, 5 Jul 2016 07:31:23 +1000 Subject: [PATCH] Check theme[key] is a string --- src/components/themr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/themr.js b/src/components/themr.js index 72c3224..0673342 100644 --- a/src/components/themr.js +++ b/src/components/themr.js @@ -60,7 +60,7 @@ export default (componentName, localTheme, options = DEFAULT_OPTIONS) => (Themed function themeable(style = {}, theme) { if (!theme) return style return [ ...Object.keys(theme), ...Object.keys(style) ].reduce((result, key) => ( - theme[key] && style[key] && theme[key].indexOf(style[key]) === -1 + typeof theme[key] === 'string' && style[key] && theme[key].indexOf(style[key]) === -1 ? { ...result, [key]: `${style[key]} ${theme[key]}` } : { ...result, [key]: theme[key] || style[key] } ), {})