From f86330a2c04a81a6cbfef5ae229fd69acf212761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Nuno=20Monteiro?= Date: Mon, 30 Jan 2017 14:55:55 -0800 Subject: [PATCH] Change the order between function declaration and object assignment 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;