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 errors when embedding on Pastel (usepastel.com) #85

Merged
merged 1 commit into from
Aug 19, 2020

Conversation

romellem
Copy link
Contributor

This is to fix errors that occur on sites that override the window global with a Proxy'd version of their own. I am not sure exactly why this is causing errors, but on its face its not surprising that someFunction.bind(window) when window is actually a custom Proxy might not work correctly.

Specifically, this happens on sites embedded on https://usepastel.com

For a test of this, navigate to

Navigate to the works.html and fails.html pages to view the errors. The works.html page uses a build from the same changes made in this PR.

If the above pastel link is down, run through the following to recreate:

This is to fix errors that occur on sites that override the `window` global
with a Proxy'd version of their own.

Specifically, this happens on sites embedded on https://usepastel.com

See the files at https://github.com/romellem/temp-site/tree/master/embla-carousel
for more information on this.

If it is still up and running, the above repo is embedded at

    https://usepastel.com/link/2w7yy/

Otherwise, simply clone that repo, spin up a GitHub Pages site,
create a free account on Pastel, and create a new "canvas"
from your new site. Navigate to the `works.html` and `fails.html`
pages to view the errors.
@davidjerleke
Copy link
Owner

Hello Matt @romellem,
Just wanted to say that I'm looking into this now. I'll let you know as soon as I'm done. Thank you for your patience.

Best
David

@davidjerleke davidjerleke merged commit 28cac09 into davidjerleke:master Aug 19, 2020
@davidjerleke davidjerleke added bug Something isn't working resolved This issue is resolved labels Aug 19, 2020
@davidjerleke
Copy link
Owner

davidjerleke commented Aug 19, 2020

@romellem from what I can see this has no effect on functionality or performance so I just merged it. I'll let you know when I've released this. Welcome to the contributors club 🙂.

@davidjerleke
Copy link
Owner

This has been released with v3.0.27. Thank you for your contribution @romellem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved This issue is resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants