From 05d8d8a6fd0f6a045687324a4b5ddda056c3aaf0 Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Mon, 10 Apr 2023 21:36:27 -0400 Subject: [PATCH] Don't validate custom elements unnecessarily --- packages/react-dom-bindings/src/client/ReactDOMComponent.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/react-dom-bindings/src/client/ReactDOMComponent.js b/packages/react-dom-bindings/src/client/ReactDOMComponent.js index 576040056b20e..e2ba29ceb3aed 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMComponent.js +++ b/packages/react-dom-bindings/src/client/ReactDOMComponent.js @@ -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;