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

Intl polyfill overrides Intl.Collator #7

Open
Pickachu opened this issue Dec 28, 2019 · 0 comments
Open

Intl polyfill overrides Intl.Collator #7

Pickachu opened this issue Dec 28, 2019 · 0 comments

Comments

@Pickachu
Copy link

Pickachu commented Dec 28, 2019

I'm using Intl.Collator to compare some strings and also the Intl.ListFormat polyfill on the same app. My app fails while trying to create a instance of the Intl.Collator class.

Importing with the url: https://polyfill.app/api/polyfill?features=intl.list-format

Pen to reproduce: https://jsbin.com/peyulegiba/edit?html,js,output
(Opening in a browser that loads and applies the polyfill, yields undefined instead of function Collator())

When debugging on mobile Safari 12, i found the overriding line:

window.Intl = Intl$1;

Probably just coping over the Intl.Collator to the polyfilled Intl will solve the issue.

window.Intl = Object.assign(window.Intl, Intl$1);

Thanks for the awesome service, looking forward to use the custom-elements polyfill next. =D

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

No branches or pull requests

1 participant