diff --git a/src/renderers/dom/client/utils/setTextContent.js b/src/renderers/dom/client/utils/setTextContent.js index d15ce89eac9fd..e85d863d623e1 100644 --- a/src/renderers/dom/client/utils/setTextContent.js +++ b/src/renderers/dom/client/utils/setTextContent.js @@ -26,6 +26,14 @@ var setInnerHTML = require('setInnerHTML'); * @internal */ var setTextContent = function(node, text) { + if (text) { + var firstChild = node.firstChild; + + if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) { + firstChild.nodeValue = text; + return; + } + } node.textContent = text; };