Skip to content

Commit

Permalink
fix ReactDOM type issues with flow 0.47
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdustan committed May 30, 2017
1 parent ca70437 commit fc861c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/renderers/dom/fiber/ReactDOMFiberComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ var ReactDOMFiberComponent = {
},

createElement(
type: string,
type: *,
props: Object,
rootContainerElement: Element | Document,
parentNamespace: string,
Expand Down Expand Up @@ -341,6 +341,7 @@ var ReactDOMFiberComponent = {
var firstChild = ((div.firstChild: any): HTMLScriptElement);
domElement = div.removeChild(firstChild);
} else if (props.is) {
// $FlowIssue `createElement` should be updated for Web Components
domElement = ownerDocument.createElement(type, {is: props.is});
} else {
// Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/dom/fiber/wrappers/ReactDOMFiberInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ var ReactDOMInput = {
// Note: IE9 reports a number inputs as 'text', so check props instead.
} else if (props.type === 'number') {
// Simulate `input.valueAsNumber`. IE9 does not support it
var valueAsNumber = parseFloat(node.value, 10) || 0;
var valueAsNumber = parseFloat(node.value) || 0;

// eslint-disable-next-line
if (value != valueAsNumber) {
Expand Down

0 comments on commit fc861c8

Please sign in to comment.