diff --git a/src/core/ReactDOMIDOperations.js b/src/core/ReactDOMIDOperations.js index a0ddd01720..c98edcbe8f 100644 --- a/src/core/ReactDOMIDOperations.js +++ b/src/core/ReactDOMIDOperations.js @@ -71,7 +71,15 @@ var ReactDOMIDOperations = { 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name] ); - DOMPropertyOperations.setValueForProperty(node, name, value); + + // If we're updating to null or undefined, we should remove the property + // from the DOM node instead of inadvertantly setting to a string. This + // brings us in line with the same behavior we have on initial render. + if (value != null) { + DOMPropertyOperations.setValueForProperty(node, name, value); + } else { + DOMPropertyOperations.deleteValueForProperty(node, name); + } }, /**