diff --git a/packages/react-dom/src/server/ReactDOMServerFormatConfig.js b/packages/react-dom/src/server/ReactDOMServerFormatConfig.js index 4db5773945a94..1c65ae1420bfd 100644 --- a/packages/react-dom/src/server/ReactDOMServerFormatConfig.js +++ b/packages/react-dom/src/server/ReactDOMServerFormatConfig.js @@ -1128,7 +1128,6 @@ function pushStartTitle( target.push(startChunkForTag('title')); let children = null; - let innerHTML = null; for (const propKey in props) { if (hasOwnProperty.call(props, propKey)) { const propValue = props[propKey]; @@ -1153,7 +1152,7 @@ function pushStartTitle( target.push(endOfStartTag); if (__DEV__) { - let child = + const child = Array.isArray(children) && children.length < 2 ? children[0] || null : children; diff --git a/scripts/error-codes/codes.json b/scripts/error-codes/codes.json index a8c8810bbe49e..832cc8712fdbc 100644 --- a/scripts/error-codes/codes.json +++ b/scripts/error-codes/codes.json @@ -418,5 +418,6 @@ "430": "ServerContext can only have a value prop and children. Found: %s", "431": "React elements are not allowed in ServerContext", "432": "This Suspense boundary was aborted by the server", - "433": "useId can only be used while React is rendering" + "433": "useId can only be used while React is rendering", + "434": "`dangerouslySetInnerHTML` does not make sense on ." }