mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
Merge pull request #6458 from mondaychen/master
No unit-less CSS value warning for `value: "0"`
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