Skip to content

fix: Elimination of unnecessary space#55

Open
yishangupenn wants to merge 3 commits into
mainfrom
upstream-pr-550
Open

fix: Elimination of unnecessary space#55
yishangupenn wants to merge 3 commits into
mainfrom
upstream-pr-550

Conversation

@yishangupenn

@yishangupenn yishangupenn commented Mar 10, 2026

Copy link
Copy Markdown

Copied from upstream: dair-ai/Prompt-Engineering-Guide#550
Original author: @silverskyvicto
Originally opened: 2024-09-03


A warning is displayed when multiple nodes are passed even though only one node can be under a <title> tag.

Warning: A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering
    at title
    at head
    at Head (webpack-internal:///./node_modules/.pnpm/next@13.5.6_@babel+core@7.23.7_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/next/dist/pages/_document.js:258:1)
    at html
    at Html (webpack-internal:///./node_modules/.pnpm/next@13.5.6_@babel+core@7.23.7_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/next/dist/pages/_document.js:676:132)
    at Document (webpack-internal:///./node_modules/.pnpm/next@13.5.6_@babel+core@7.23.7_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/next/dist/pages/_document.js:692:1)

ref: vercel/next.js#38256

If there is an extra blank space at the end of the title, it is assumed to be recognized as a separate node.
By removing the blank space, this error no longer appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants