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

An issue arises from the window code. #841

Open
Pixel-Tao opened this issue Jun 16, 2023 · 0 comments
Open

An issue arises from the window code. #841

Pixel-Tao opened this issue Jun 16, 2023 · 0 comments

Comments

@Pixel-Tao
Copy link

Pixel-Tao commented Jun 16, 2023

const ua = window?.navigator?.userAgent ?? ''; // Check the userAgent property of the window.navigator object

image

image

This issue occurs in Next.js. It arises when the server-side rendering (SSR) cannot find the window object. I tried to make it render on the client-side (CSR), but the server still throws an error.
Is there a solution?

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