mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Improve error message for components in bad states (missing instance) (#6990)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user