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
…facebook#6990)

(cherry picked from commit 7988aca)
  • Loading branch information
yungsters authored and zpao committed Jun 8, 2016
1 parent 9358c19 commit e90e878
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 e90e878

Please sign in to comment.