Skip to content

Intl polyfill overrides Intl.Collator #7

@Pickachu

Description

@Pickachu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions