mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
"0" can be the only valid unitless number string
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user