Skip to content

Commit

Permalink
Restore validateDOMNesting to errors
Browse files Browse the repository at this point in the history
- instead of warnings
  • Loading branch information
cee-chen committed Feb 5, 2024
1 parent 58c4644 commit 616a5b1
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions scripts/jest/setup/throw_on_console_error.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,5 @@ console.error = (message, ...rest) => {
return;
}

// Print React validateDOMNesting warning as a console.warn instead
// of throwing an error.
// TODO: Remove when edge-case DOM nesting is fixed in all components
if (
typeof message === 'string' &&
message.startsWith(
'Warning: validateDOMNesting(...): %s cannot appear as a child of <%s>'
)
) {
console.warn(message, ...rest);
return;
}

throw new Error(format(message, ...rest));
};

0 comments on commit 616a5b1

Please sign in to comment.