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

Undefined document.title CSS injection bug fix #1525

Merged
merged 3 commits into from
Apr 25, 2024
Merged

Conversation

Marwaxhello
Copy link
Contributor

Bij het implementeren van de sidenav-component van Den Haag kwam ik een fout tegen. We gebruiken React-componenten zoals sidenav in Next.js, maar er gaat iets mis bij server-side rendering. Telkens wanneer de component wordt gebruikt, krijgen we een foutmelding door de CSS-injectiecode: document is undefined

Met deze kleine check if (typeof document !== 'undefined') { ... } wordt de CSS-injectie overgeslagen tijdens server-side rendering, hopelijk werken alle componenten nu goed in Next.js.

Copy link

vercel bot commented Apr 22, 2024

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

Name Status Preview Updated (UTC)
denhaag ✅ Ready (Inspect) Visit Preview Apr 22, 2024 0:01am

Copy link
Contributor

@YourivHDenHaag YourivHDenHaag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@YourivHDenHaag YourivHDenHaag merged commit feaa692 into main Apr 25, 2024
8 checks passed
@YourivHDenHaag YourivHDenHaag deleted the fix/sidenav-export branch April 25, 2024 09:20
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.

4 participants