From 9d21b524ffd88f5b6b86eb1c50813fe7015c7a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Nuno=20Monteiro?= Date: Mon, 6 Feb 2017 17:02:13 +0100 Subject: [PATCH] Change the order between function declaration and object assignment (#8895) This fixes #8894 --- .../stack/reconciler/instantiateReactComponent.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/renderers/shared/stack/reconciler/instantiateReactComponent.js b/src/renderers/shared/stack/reconciler/instantiateReactComponent.js index d1b5c23262c6a..bc5b1eeec0bbf 100644 --- a/src/renderers/shared/stack/reconciler/instantiateReactComponent.js +++ b/src/renderers/shared/stack/reconciler/instantiateReactComponent.js @@ -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) { @@ -157,4 +150,12 @@ function instantiateReactComponent(node, shouldHaveDebugID) { return instance; } +Object.assign( + ReactCompositeComponentWrapper.prototype, + ReactCompositeComponent, + { + _instantiateReactComponent: instantiateReactComponent, + } +); + module.exports = instantiateReactComponent;