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

Google Maps breaks core-js Array.from on IE 11, preventing stimulus controllers to load. #329

Closed
virolea opened this issue Sep 8, 2020 · 3 comments

Comments

@virolea
Copy link

virolea commented Sep 8, 2020

Faced an issue today where google maps API breaks core-js's Array.from with the following message :

This site overrides Array.from() with an implementation that doesn't support iterables, which could cause Google Maps JavaScript API v3 to not work correctly.

Google Maps appears to override core-js's Symbol.iterator with their own polyfill thus creating the error. Anyone loading google maps on their page on IE 11 will have a JS error preventing their stimulus controllers to initialize properly without further action.

A working solution is to add core-js's Symbol.iterator.

This is not a stimulus issue per-se, but a fix would greatly improve developer experience for those who are still supporting IE11.

I'll attach a PR to this issue for your review,

@SampsonCrowley
Copy link

@javan
Copy link
Contributor

javan commented Oct 27, 2020

Thanks! Perhaps you can follow auth0/auth0-spa-js#592 lead (in your application):

To fix see the 2 worksrounds in zloirock/core-js#618

1. Put the maps api before the spa js SDK2.

2. Add `import 'core-js/es6/symbol';` before importing `array-from`

Closing since this isn't a Stimulus issue.

@javan javan closed this as completed Oct 27, 2020
@virolea
Copy link
Author

virolea commented Nov 2, 2020

hi @javan thanks for your reply,

I had already added the workarounds in my application, I figured it was not a stimulus issue, hope this issue can help other people find a solution too.

Have a great one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants