Skip to content

Commit

Permalink
functionName => name
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed May 15, 2017
1 parent 23cd04b commit 01107b0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ describe('ReactElementValidator', () => {

var stack = console.stack.mock.calls[0][0];
expect(Array.isArray(stack)).toBe(true);
expect(stack.map(frame => frame.functionName)).toEqual([
expect(stack.map(frame => frame.name)).toEqual([
'Foo', // <Bad> is inside Foo
'App', // <Foo> is inside App
'App', // <div> is inside App
Expand Down
4 changes: 2 additions & 2 deletions src/isomorphic/hooks/ReactComponentTreeHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ var ReactComponentTreeHook = {
try {
if (isCreatingElement) {
stack.push({
functionName: id ? ReactComponentTreeHook.getDisplayName(id) : null,
name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
fileName: currentSource ? currentSource.fileName : null,
lineNumber: currentSource ? currentSource.lineNumber : null,
});
Expand All @@ -433,7 +433,7 @@ var ReactComponentTreeHook = {
: null;
var source = element && element._source;
stack.push({
functionName: ownerName,
name: ownerName,
fileName: source ? source.fileName : null,
lineNumber: source ? source.lineNumber : null,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ describe('ReactJSXElementValidator', () => {

var stack = console.stack.mock.calls[0][0];
expect(Array.isArray(stack)).toBe(true);
expect(stack.map(frame => frame.functionName)).toEqual([
expect(stack.map(frame => frame.name)).toEqual([
'Foo', // <Bad> is inside Foo
'App', // <Foo> is inside App
'App', // <div> is inside App
Expand Down

0 comments on commit 01107b0

Please sign in to comment.