Clear error message when rendering a nonvalid component
This commit is contained in:
parent
aedf580a33
commit
9e24257a4e
|
@ -860,7 +860,8 @@ var ReactCompositeComponentMixin = {
|
|||
}
|
||||
invariant(
|
||||
ReactComponent.isValidComponent(renderedComponent),
|
||||
'%s.render(): A valid ReactComponent must be returned.',
|
||||
'%s.render(): A valid ReactComponent must be returned. You may have ' +
|
||||
'returned null, undefined, an array or some other invalid object.',
|
||||
this.constructor.displayName || 'ReactCompositeComponent'
|
||||
);
|
||||
return renderedComponent;
|
||||
|
|
Loading…
Reference in New Issue