"0" can be the only valid unitless number string

This commit is contained in:
mondaychen
2016-04-08 11:55:31 -04:00
parent 2b1bd1d7fe
commit 4e81eb4403
@@ -44,7 +44,7 @@ function dangerousStyleValue(name, value, component) {
}
var isNonNumeric = isNaN(value);
if (isNonNumeric || value === 0 ||
if (isNonNumeric || value === 0 || value === '0' ||
isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
return '' + value; // cast to string
}