Skip to content

Commit

Permalink
Don't validate custom elements unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Apr 11, 2023
1 parent 9f4b6c1 commit 05d8d8a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/react-dom-bindings/src/client/ReactDOMComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -747,14 +747,8 @@ function setPropOnCustomElement(
}
case 'children': {
if (typeof value === 'string') {
if (__DEV__) {
validateTextNesting(value, tag);
}
setTextContent(domElement, value);
} else if (typeof value === 'number') {
if (__DEV__) {
validateTextNesting('' + value, tag);
}
setTextContent(domElement, '' + value);
}
break;
Expand Down

0 comments on commit 05d8d8a

Please sign in to comment.