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(dom): support envs without isEqualNode #88

Merged
merged 1 commit into from Jan 22, 2023

Conversation

gangsthub
Copy link
Contributor

When being used in a test environment, with happy-dom, this method is not implemented.

More context: capricorn86/happy-dom#656

I was facing this issue testing a Nuxt app, with vitest (and https://github.com/danielroe/vitest-environment-nuxt).

Making the check optional, makes my tests pass. But it might be too naive?

@harlan-zw
Copy link
Collaborator

harlan-zw commented Jan 22, 2023

Hmm seems like this could result in duplicate tags being inserted for environments that don't support isEqualNode, however, it is well-supported so not a big issue.

I'll merge for now, let me know if you run into any other issues though

Thanks!

@harlan-zw harlan-zw changed the title fix: use optional chaining when isEqualNode is not available fix(dom): support envs without isEqualNode Jan 22, 2023
@harlan-zw harlan-zw merged commit 5ad7e61 into unjs:main Jan 22, 2023
@gangsthub gangsthub deleted the gangsthub-patch-1 branch January 23, 2023 13:31
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

2 participants