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 gaearon committed Feb 6, 2017
1 parent fa1087b commit 4313059
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 4313059

Please sign in to comment.