Skip to content

Commit

Permalink
Improve error message for components in bad states (missing instance) (
Browse files Browse the repository at this point in the history
…#6990)

(cherry picked from commit 7988aca)
  • Loading branch information
yungsters authored and zpao committed Jun 14, 2016
1 parent e974383 commit 6eeb289
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,13 @@ var ReactCompositeComponentMixin = {
nextUnmaskedContext
) {
var inst = this._instance;
invariant(
inst != null,
'Attempted to update component `%s` that has already been unmounted ' +
'(or failed to mount).',
this.getName() || 'ReactCompositeComponent'
);

var willReceive = false;
var nextContext;
var nextProps;
Expand Down

0 comments on commit 6eeb289

Please sign in to comment.