Update invalid render error message
forgot to update the message following the previous diff on rendering null.
Cheng Lou committed
Apr 9, 2014 at 17:50 UTC
5a9d0c6a123764e52e4be3f428be5d967bc5a771
2 files changed
+3
-3
src/core/ReactCompositeComponent.js
+1
-1
@@ -1181,7 +1181,7 @@ var ReactCompositeComponentMixin = {
1181
invariant(
1182
ReactDescriptor.isValidDescriptor(renderedComponent),
1183
'%s.render(): A valid ReactComponent must be returned. You may have ' +
1184
- 'returned an array or some other invalid object.',
1184
+ 'returned undefined, an array or some other invalid object.',
1185
this.constructor.displayName || 'ReactCompositeComponent'
1186
);
1187
return renderedComponent;
src/core/__tests__/ReactCompositeComponent-test.js
+2
-2
@@ -159,8 +159,8 @@ describe('ReactCompositeComponent', function() {
159
ReactTestUtils.renderIntoDocument(<Component />);
160
}).toThrow(
161
'Invariant Violation: Component.render(): A valid ReactComponent must ' +
162
- 'be returned. You may have returned an array or some other invalid ' +
163
- 'object.'
162
+ 'be returned. You may have returned undefined, an array or some other ' +
163
+ 'invalid object.'
164
);
165
});
166