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

Title is being set to an empty string on client-side navigation with SSR #135

Closed
matiasperz opened this issue Jul 29, 2024 · 1 comment
Closed

Comments

@matiasperz
Copy link
Contributor

matiasperz commented Jul 29, 2024

Hey! I noticed that on this personal project of mine my <title> tag is getting emptied each time on client-side navigation. I only have a +Head.tsx file defined at root so should't be overridden by any page.

Digging into the onRenderClient.tsx I noticed that the title var that comes from the pageContext.configEntries is being set to an empty string if it returns a falsy value, so it always updates the head <title> tag. Wondering if it's safe removing this || '' at the end of the line.

https://github.com/vikejs/vike-react/blob/bdf9e088902821e14e6bf76fcb6a9769347392fd/packages/vike-react/src/renderer/onRenderClient.tsx#L59C53-L59C59

@brillout
Copy link
Member

Fix pre-released as 0.4.18-commit-5c88c7b.

In case your company is up for it, we're looking for sponsors (vikejs/vike#1350).

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

No branches or pull requests

2 participants