-
Notifications
You must be signed in to change notification settings - Fork 22
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
SSR support broken when version > 3.1.12 #290
Labels
Comments
Released in version 3.4.6, don't hesitate to reopen an issue if the problem comes from another component |
Thanks ! |
revolunet
pushed a commit
to revolunet/react-dsfr
that referenced
this issue
Nov 29, 2022
revolunet
pushed a commit
to revolunet/react-dsfr
that referenced
this issue
Nov 29, 2022
desoindx
pushed a commit
that referenced
this issue
Dec 1, 2022
🎉 This issue has been resolved in version 3.4.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like some recent changes introduced some SSR-incompatible code.
I think it comes from
window
access here : https://github.com/dataesr/react-dsfr/blob/master/src/components/interface/SwitchTheme/SwitchTheme.js#L62window
existence could be tested before access, ex :typeof window!=="undefined" && window.localStorage.getItem("prefers-color-scheme")
The text was updated successfully, but these errors were encountered: