@samitouri / QOS-React / commits / 263615573c

Stop passing null as second argument to document.createElement() (#6896)

* Stop passing null as second argument to document.createElement() * rewrap check for props.is to make it more readable

Robin Berjon committed May 26, 2016 at 16:51 UTC 263615573c1812395ff0eb04911b3e55ac213bb1
1 file changed +3 -1
src/renderers/dom/shared/ReactDOMComponent.js
+3 -1
@@ -621,8 +621,10 @@ ReactDOMComponent.Mixin = {
621 var type = this._currentElement.type;
622 div.innerHTML = `<${type}></${type}>`;
623 el = div.removeChild(div.firstChild);
624 + } else if (props.is) {
625 + el = ownerDocument.createElement(this._currentElement.type, props.is);
626 } else {
625 - el = ownerDocument.createElement(this._currentElement.type, props.is || null);
627 + el = ownerDocument.createElement(this._currentElement.type);
628 }
629 } else {
630 el = ownerDocument.createElementNS(