react-dom
Advanced tools
Comparing version 15.6.0 to 15.6.1
@@ -106,6 +106,2 @@ /** | ||
var warnValidStyle = function (name, value, component) { | ||
// Don't warn for CSS variables | ||
if (name.indexOf('--') === 0) { | ||
return; | ||
} | ||
var owner; | ||
@@ -152,9 +148,12 @@ if (component) { | ||
} | ||
var isCustomProperty = styleName.indexOf('--') === 0; | ||
var styleValue = styles[styleName]; | ||
if (process.env.NODE_ENV !== 'production') { | ||
warnValidStyle(styleName, styleValue, component); | ||
if (!isCustomProperty) { | ||
warnValidStyle(styleName, styleValue, component); | ||
} | ||
} | ||
if (styleValue != null) { | ||
serialized += processStyleName(styleName) + ':'; | ||
serialized += dangerousStyleValue(styleName, styleValue, component) + ';'; | ||
serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';'; | ||
} | ||
@@ -187,10 +186,13 @@ } | ||
} | ||
var isCustomProperty = styleName.indexOf('--') === 0; | ||
if (process.env.NODE_ENV !== 'production') { | ||
warnValidStyle(styleName, styles[styleName], component); | ||
if (!isCustomProperty) { | ||
warnValidStyle(styleName, styles[styleName], component); | ||
} | ||
} | ||
var styleValue = dangerousStyleValue(styleName, styles[styleName], component); | ||
var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty); | ||
if (styleName === 'float' || styleName === 'cssFloat') { | ||
styleName = styleFloatAccessor; | ||
} | ||
if (styleName.indexOf('--') === 0) { | ||
if (isCustomProperty) { | ||
style.setProperty(styleName, styleValue); | ||
@@ -197,0 +199,0 @@ } else if (styleValue) { |
@@ -29,3 +29,3 @@ /** | ||
*/ | ||
function dangerousStyleValue(name, value, component) { | ||
function dangerousStyleValue(name, value, component, isCustomProperty) { | ||
// Note that we've removed escapeTextForBrowser() calls here since the | ||
@@ -47,3 +47,3 @@ // whole string will be escaped when the attribute is injected into | ||
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 | ||
@@ -50,0 +50,0 @@ } |
@@ -59,6 +59,7 @@ /** | ||
// if someone has already defined a value bail and don't track value | ||
// will cause over reporting of changes, but it's better then a hard failure | ||
// (needed for certain tests that spyOn input values) | ||
if (node.hasOwnProperty(valueField)) { | ||
// if someone has already defined a value or Safari, then bail | ||
// and don't track value will cause over reporting of changes, | ||
// but it's better then a hard failure | ||
// (needed for certain tests that spyOn input values and Safari) | ||
if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') { | ||
return; | ||
@@ -65,0 +66,0 @@ } |
@@ -13,2 +13,2 @@ /** | ||
module.exports = '15.6.0'; | ||
module.exports = '15.6.1'; |
{ | ||
"name": "react-dom", | ||
"version": "15.6.0", | ||
"version": "15.6.1", | ||
"description": "React package for working with the DOM.", | ||
@@ -19,6 +19,6 @@ "main": "index.js", | ||
"object-assign": "^4.1.0", | ||
"prop-types": "~15.5.7" | ||
"prop-types": "^15.5.10" | ||
}, | ||
"peerDependencies": { | ||
"react": "^15.6.0-rc.1" | ||
"react": "^15.6.1" | ||
}, | ||
@@ -25,0 +25,0 @@ "files": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2213862
51040
+ Addedprop-types@15.8.1(transitive)
+ Addedreact-is@16.13.1(transitive)
- Removedprop-types@15.5.10(transitive)
Updatedprop-types@^15.5.10