@samitouri / QOS-React / commits / 7988acaa95

Improve error message for components in bad states (missing instance) (#6990)

Timothy Yung committed Jun 7, 2016 at 17:23 UTC 7988acaa95bb6cd889820ea07c960a824b43e9eb
1 file changed +7
src/renderers/shared/stack/reconciler/ReactCompositeComponent.js
+7
@@ -741,6 +741,13 @@ var ReactCompositeComponentMixin = {
741 nextUnmaskedContext
742 ) {
743 var inst = this._instance;
744 + invariant(
745 + inst != null,
746 + 'Attempted to update component `%s` that has already been unmounted ' +
747 + '(or failed to mount).',
748 + this.getName() || 'ReactCompositeComponent'
749 + );
750 +
751 var willReceive = false;
752 var nextContext;
753 var nextProps;