Skip to content

Commit

Permalink
Stop passing null as second argument to document.createElement() (#6896)
Browse files Browse the repository at this point in the history
* Stop passing null as second argument to document.createElement()

* rewrap check for props.is to make it more readable
  • Loading branch information
darobin authored and gaearon committed May 26, 2016
1 parent ca5a0da commit 2636155
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/renderers/dom/shared/ReactDOMComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,10 @@ ReactDOMComponent.Mixin = {
var type = this._currentElement.type;
div.innerHTML = `<${type}></${type}>`;
el = div.removeChild(div.firstChild);
} else if (props.is) {
el = ownerDocument.createElement(this._currentElement.type, props.is);
} else {
el = ownerDocument.createElement(this._currentElement.type, props.is || null);
el = ownerDocument.createElement(this._currentElement.type);
}
} else {
el = ownerDocument.createElementNS(
Expand Down

0 comments on commit 2636155

Please sign in to comment.