Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ describe('ReactIncrementalErrorHandling', () => {
}

function stripStackTrace(obj) {
obj[0].prop = removeStack(obj[0].prop);
return obj;
let stripped = [...obj];
stripped[0].prop = removeStack(stripped[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.

This still mutates the object.

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.

Okay I guess I don't fully understand mutation. Let me know how the most recent changes look. I'm also going to start trying to fix the build errors.

return stripped;
}

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