Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ describe('ReactIncrementalErrorHandling', () => {
return str && str.replace(/in .+? \(at .+?:\d+\)/g, '').trim();
}

function stripStackTrace(obj) {
let stripped = [...obj];
stripped[0].prop = removeStack(stripped[0].prop);
return stripped;
function stripStackTrace(compSpan) {
return [{
...compSpan[0],
prop: removeStack(compSpan[0].prop),
}];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is (incorrectly) more than one child, this will ignore it. Let's make sure we don't "lose" any input children?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. Let me see what I can come up with.

}

it('catches render error in a boundary during full deferred mounting', () => {
Expand Down