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

(cherry picked from commit 2636155)
  • Loading branch information
darobin authored and zpao committed Jun 14, 2016
1 parent 689f5cc commit 677dd27
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 @@ -614,8 +614,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 677dd27

Please sign in to comment.