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

Calling client side code from server side #3400

Closed
alvarolozano opened this issue Nov 6, 2024 · 2 comments
Closed

Calling client side code from server side #3400

alvarolozano opened this issue Nov 6, 2024 · 2 comments

Comments

@alvarolozano
Copy link

The detectLanguageFromHeaders is supposed to be a SERVER function, but it is calling the detectLanguage function which is supposed to be a CLIENT function

return languages[0] && detectLanguage(languages[0], availableLanguages);

So this line makes the initialization to fail, because it is calling the window object from the server.

const preferredTwoLetter = getTwoLetters(window.navigator.language);

@alvarolozano
Copy link
Author

Possibly fixed in #3401

@stepan662
Copy link
Collaborator

Fixed in #3401

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