Skip to content

Commit

Permalink
Add Parent Stack on invalid element type
Browse files Browse the repository at this point in the history
  • Loading branch information
n3tr committed Dec 25, 2016
1 parent 7cab4ff commit 1b3253f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/isomorphic/classic/element/ReactElementValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ var ReactElementValidator = {
info += getDeclarationErrorAddendum();
}

info += ReactComponentTreeHook.getCurrentStackAddendum();

warning(
false,
'React.createElement: type is invalid -- expected a string (for ' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@ describe('ReactElementValidator', () => {
expectDev(console.error.calls.argsFor(0)[0]).toBe(
'Warning: React.createElement: type is invalid -- expected a string ' +
'(for built-in components) or a class/function (for composite ' +
'components) but got: null. Check the render method of `ParentComp`.'
'components) but got: null. Check the render method of `ParentComp`.' +
'\n in ParentComp'
);
});

Expand Down

0 comments on commit 1b3253f

Please sign in to comment.