diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/react-dom/lib/dangerousStyleValue.js | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
Diffstat (limited to 'node_modules/react-dom/lib/dangerousStyleValue.js')
-rw-r--r-- | node_modules/react-dom/lib/dangerousStyleValue.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node_modules/react-dom/lib/dangerousStyleValue.js b/node_modules/react-dom/lib/dangerousStyleValue.js index 6996df2fe..1164f1a91 100644 --- a/node_modules/react-dom/lib/dangerousStyleValue.js +++ b/node_modules/react-dom/lib/dangerousStyleValue.js @@ -26,7 +26,7 @@ var styleWarnings = {}; * @param {ReactDOMComponent} component * @return {string} Normalized style value with dimensions applied. */ -function dangerousStyleValue(name, value, component) { +function dangerousStyleValue(name, value, component, isCustomProperty) { // Note that we've removed escapeTextForBrowser() calls here since the // whole string will be escaped when the attribute is injected into // the markup. If you provide unsafe user data here they can inject @@ -43,7 +43,7 @@ function dangerousStyleValue(name, value, component) { } var isNonNumeric = isNaN(value); - if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { + if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { return '' + value; // cast to string } |