`"0"` can be the only valid unitless number string
mondaychen committed
Apr 8, 2016 at 11:55 UTC
4e81eb4403fea4e9d82d68f3f614f0ddf3688479
1 file changed
+1
-1
src/renderers/dom/shared/dangerousStyleValue.js
+1
-1
@@ -44,7 +44,7 @@ function dangerousStyleValue(name, value, component) {
44
}
45
46
var isNonNumeric = isNaN(value);
47
- if (isNonNumeric || value === 0 ||
47
+ if (isNonNumeric || value === 0 || value === '0' ||
48
isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
49
return '' + value; // cast to string
50
}