react-css-themr
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -103,3 +103,3 @@ 'use strict'; | ||
return [].concat(_toConsumableArray(Object.keys(theme)), _toConsumableArray(Object.keys(style))).reduce(function (result, key) { | ||
return theme[key] && style[key] && theme[key].indexOf(style[key]) === -1 ? _extends({}, result, _defineProperty({}, key, style[key] + ' ' + theme[key])) : _extends({}, result, _defineProperty({}, key, theme[key] || style[key])); | ||
return typeof theme[key] === 'string' && style[key] && theme[key].indexOf(style[key]) === -1 ? _extends({}, result, _defineProperty({}, key, style[key] + ' ' + theme[key])) : _extends({}, result, _defineProperty({}, key, theme[key] || style[key])); | ||
}, {}); | ||
@@ -106,0 +106,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/javivelasco/react-css-themr#readme", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"main": "./lib", | ||
@@ -8,0 +8,0 @@ "author": { |
@@ -63,3 +63,3 @@ import React, { Component, PropTypes } from 'react' | ||
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]}` } | ||
@@ -66,0 +66,0 @@ : { ...result, [key]: theme[key] || style[key] } |
23535