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

fix: change document check to avoid reference error #128

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

Conversation

henrijoss
Copy link

Seems like the mutation callback gets executed after the document is gone in vitest which causes following error:
Error: Uncaught [ReferenceError: document is not defined]

- if (!document) {
+ if (typeof document === 'undefined') {

By changing the condition like this the check should work as intended.

@leifmarcus
Copy link

Are there any updates on this? This fix would be really nice to have.

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.

2 participants