Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Elimination of unnecessary space #550

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

silverskyvicto
Copy link

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/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/pages/_document.js:258:1)
    at html
    at Html (webpack-internal:///./node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/pages/_document.js:676:132)
    at Document (webpack-internal:///./node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/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.

Copy link

vercel bot commented Sep 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
prompt-engineering-guide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 3, 2024 4:52am

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.

1 participant