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

few small improvements #29

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

Conversation

jimmywarting
Copy link

@jimmywarting jimmywarting commented May 20, 2023

using if(window && document) in NodeJS did not particularly work inside of NodeJS or worker.
window is undefined so a real check have to do: if (typeof window !== undefined ...)

otherwise you get the unhandled type error: window is not defined

but something better would be to use globalThis that exist in all environment.

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.

None yet

1 participant