Skip to content

An issue arises from the window code. #841

@Pixel-Tao

Description

@Pixel-Tao

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions