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

SSR broken when Navigator object is defined. Node JS 21. #1046

Open
sannajammeh opened this issue Dec 13, 2023 · 0 comments
Open

SSR broken when Navigator object is defined. Node JS 21. #1046

sannajammeh opened this issue Dec 13, 2023 · 0 comments

Comments

@sannajammeh
Copy link

sannajammeh commented Dec 13, 2023

Some environments have Navigator as an empty object even on the server.

Node JS v21 has navigator defined as an empty object.

This causes libraries like echarts to be incompatible with ssr and crash.

The problem is line 35 in zrender/lib/core/env.js

else if (typeof navigator === 'undefined')

Should ideally be:

else if (typeof window === 'undefined')
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

1 participant