You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But if the application is running as a part of common layout, this meta tag is found in body,
like here, #8220 (comment)
so we getting an error head-manager.ts:49 Uncaught (in promise) TypeError: Cannot read property 'content' of null, so description and other meta tags cannot be set on client side.
Describe the solution you'd like
it would be nice to change the query selector to const headCountEl = document.querySelector('meta[name=next-head-count]');, so it can be searched in the whole document.
Describe alternatives you've considered
For now this is the only solution I see
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 28, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the feature you'd like to request
For now, by default, when rendering the app head, next searches for
meta[name=next-head-count]
in the document's root head. https://github.com/vercel/next.js/blob/master/packages/next/client/head-manager.ts#L37But if the application is running as a part of common layout, this meta tag is found in body,
like here, #8220 (comment)
so we getting an error
head-manager.ts:49 Uncaught (in promise) TypeError: Cannot read property 'content' of null
, so description and other meta tags cannot be set on client side.Describe the solution you'd like
it would be nice to change the query selector to
const headCountEl = document.querySelector('meta[name=next-head-count]');
, so it can be searched in the whole document.Describe alternatives you've considered
For now this is the only solution I see
The text was updated successfully, but these errors were encountered: