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

Update 'isServer' to also check for customElements #36

Merged
merged 2 commits into from
Jun 24, 2021
Merged

Conversation

KimPaow
Copy link
Contributor

@KimPaow KimPaow commented Jun 24, 2021

In some environments there are preexisting window shims that do not have the customElements on the window object. This update will check for those cases.

See: sanity-io/sanity-plugin-mux-input#36 (comment)

@vercel
Copy link

vercel bot commented Jun 24, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mux/media-chrome/Fe5hofZXBeht4vDwfqZUUeawyg4V
✅ Preview: https://media-chrome-git-fork-kimpaow-main-mux.vercel.app

Copy link
Collaborator

@heff heff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to try and see what happens, but this could break whatever was relying on the other window shim by overriding it with ours, unless the other shim is just a blank object.

If we run into an issue here we could separate shimming the window and shimming custom elements, so that custom elements get added to any existing window shim (or our window shim if needed).

👍

@heff heff merged commit d7be570 into muxinc:main Jun 24, 2021
@heff
Copy link
Collaborator

heff commented Jun 24, 2021

v0.1.1 - thanks @KimPaow and @dylanjha!

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.

4 participants