Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into pointer-events
Browse files Browse the repository at this point in the history
# Conflicts:
#	scripts/rollup/results.json
  • Loading branch information
philipp-spiess committed Apr 16, 2018
2 parents da440d7 + 5dfbfe9 commit 9548c1c
Show file tree
Hide file tree
Showing 58 changed files with 1,114 additions and 1,033 deletions.
6 changes: 2 additions & 4 deletions dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,12 @@ function git(args) {
previousBuildResults
);

const percentToWarrentShowing = 1;
const packagesToShow = results
.filter(
r =>
Math.abs(r.prevFileSizeChange) >= percentToWarrentShowing ||
Math.abs(r.prevGzipSizeChange) >= percentToWarrentShowing
Math.abs(r.prevFileSizeAbsoluteChange) >= 300 || // bytes
Math.abs(r.prevGzipSizeAbsoluteChange) >= 100 // bytes
)

.map(r => r.packageName);

if (packagesToShow.length) {
Expand Down
4 changes: 1 addition & 3 deletions packages/react-dom/src/__tests__/findDOMNode-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ describe('findDOMNode', () => {
it('findDOMNode should reject random objects', () => {
expect(function() {
ReactDOM.findDOMNode({foo: 'bar'});
}).toThrowError(
'Element appears to be neither ReactComponent nor DOMNode. Keys: foo',
);
}).toThrowError('Argument appears to not be a ReactComponent. Keys: foo');
});

it('findDOMNode should reject unmounted objects with render func', () => {
Expand Down
15 changes: 1 addition & 14 deletions packages/react-dom/src/client/ReactDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -1147,20 +1147,7 @@ const ReactDOM: Object = {
return (componentOrElement: any);
}

const inst = ReactInstanceMap.get(componentOrElement);
if (inst) {
return DOMRenderer.findHostInstance(inst);
}

if (typeof componentOrElement.render === 'function') {
invariant(false, 'Unable to find node on an unmounted component.');
} else {
invariant(
false,
'Element appears to be neither ReactComponent nor DOMNode. Keys: %s',
Object.keys(componentOrElement),
);
}
return DOMRenderer.findHostInstance(componentOrElement);
},

hydrate(element: React$Node, container: DOMContainer, callback: ?Function) {
Expand Down
Loading

0 comments on commit 9548c1c

Please sign in to comment.