Skip to content

Commit

Permalink
Change the order between function declaration and object assignment (#…
Browse files Browse the repository at this point in the history
…8895)

This fixes #8894
  • Loading branch information
anmonteiro authored and Brian Vaughn committed Mar 28, 2017
1 parent e33eab4 commit 9d21b52
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ var warning = require('warning');
var ReactCompositeComponentWrapper = function(element) {
this.construct(element);
};
Object.assign(
ReactCompositeComponentWrapper.prototype,
ReactCompositeComponent,
{
_instantiateReactComponent: instantiateReactComponent,
}
);

function getDeclarationErrorAddendum(owner) {
if (owner) {
Expand Down Expand Up @@ -157,4 +150,12 @@ function instantiateReactComponent(node, shouldHaveDebugID) {
return instance;
}

Object.assign(
ReactCompositeComponentWrapper.prototype,
ReactCompositeComponent,
{
_instantiateReactComponent: instantiateReactComponent,
}
);

module.exports = instantiateReactComponent;

0 comments on commit 9d21b52

Please sign in to comment.