Skip to content

Commit

Permalink
Merge pull request facebook#6458 from mondaychen/master
Browse files Browse the repository at this point in the history
No unit-less CSS value warning for `value: "0"`
  • Loading branch information
jimfb committed Apr 8, 2016
2 parents 09022b1 + 4e81eb4 commit 2548108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderers/dom/shared/dangerousStyleValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 2548108

Please sign in to comment.