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

Debug: fix window is undefined bug on next.js framework #168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jabusir
Copy link

@jabusir jabusir commented Jul 1, 2023

Hi,

I was using this library in a Next.js application and ran into a bug in the os.js folder where 'window' was undefined since there is no 'window' object on the server side.

To resolve this issue I added some additional checking to see if the code was executing in a browser environment before trying to access the 'window' object.

I've attached an image of the error below.

image

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

Successfully merging this pull request may close these issues.

1 participant