styled-system
Advanced tools
Comparing version 3.1.8 to 3.1.9
# Changelog | ||
## v3.1.9 2018-10-10 | ||
- Allow `getTheme` to return falsy values | ||
## v3.1.8 2018-10-10 | ||
@@ -5,0 +9,0 @@ |
@@ -51,3 +51,3 @@ "use strict"; | ||
return paths.join('.').split('.').reduce(function (a, b) { | ||
return a && a[b] ? a[b] : null; | ||
return a && b in a ? a[b] : null; | ||
}, obj); | ||
@@ -60,3 +60,4 @@ }; | ||
return function (props) { | ||
return get(props.theme, paths) || fallback; | ||
var getVal = get(props.theme, paths); | ||
return is(getVal) ? getVal : fallback; | ||
}; | ||
@@ -63,0 +64,0 @@ }; |
@@ -30,3 +30,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return paths.join('.').split('.').reduce(function (a, b) { | ||
return a && a[b] ? a[b] : null; | ||
return a && b in a ? a[b] : null; | ||
}, obj); | ||
@@ -36,3 +36,4 @@ }; | ||
return function (props) { | ||
return get(props.theme, paths) || fallback; | ||
var getVal = get(props.theme, paths); | ||
return is(getVal) ? getVal : fallback; | ||
}; | ||
@@ -39,0 +40,0 @@ }; |
{ | ||
"name": "styled-system", | ||
"version": "3.1.8", | ||
"version": "3.1.9", | ||
"description": "Responsive, theme-based style props for building design systems with React", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
48078
1302