styled-components-modifiers
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -8,6 +8,10 @@ 'use strict'; | ||
var _lodash = require('lodash.isobject'); | ||
var _lodash = require('lodash.isfunction'); | ||
var _lodash2 = _interopRequireDefault(_lodash); | ||
var _lodash3 = require('lodash.isobject'); | ||
var _lodash4 = _interopRequireDefault(_lodash3); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -29,5 +33,8 @@ | ||
var modifierFunc = modifierConfig[modifierName]; | ||
var config = modifierFunc(componentProps); | ||
var styles = (0, _lodash2.default)(config) ? config.styles : config; | ||
return acc.concat(styles); | ||
if ((0, _lodash2.default)(modifierFunc)) { | ||
var config = modifierFunc(componentProps); | ||
var styles = (0, _lodash4.default)(config) ? config.styles : config; | ||
return acc.concat(styles); | ||
} | ||
return acc; | ||
}, []); | ||
@@ -34,0 +41,0 @@ |
{ | ||
"name": "styled-components-modifiers", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A library that enables BEM flavored modifiers to styled components", | ||
@@ -43,2 +43,3 @@ "main": "dist/index.js", | ||
"lodash.iserror": "^3.1.1", | ||
"lodash.isfunction": "^3.0.8", | ||
"lodash.isobject": "^3.0.2", | ||
@@ -45,0 +46,0 @@ "lodash.keys": "^4.2.0", |
Sorry, the diff of this file is not supported yet
161921
180
10
+ Addedlodash.isfunction@^3.0.8
+ Addedlodash.isfunction@3.0.9(transitive)