Skip to content

window is not defined error during SSR #81

@tim-soft

Description

@tim-soft

Describe the bug
Trying out this library in an isomorphic app, during a server-side render, this library throws a reference error that the window is not defined.

Expected behavior
Add a sanity check to see if the window exists yet before trying to initialize anything against the window object.

ref to similar solution: fisshy/react-scroll#209

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions