Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

runtime.js should read Symbol values dynamically #560

Open
@matthieusieben

Description

@matthieusieben

runtime.js currently caches the values of Symbol.iterator, Symbol.asyncIterator and Symbol.toStringTag when it is loaded (here).

This can cause issues when regenerator-runtime is loaded before the Symbol polyfills. Here is an example of Babel build that fails running on IE11 due to the order of the imports:
Capture d’écran 2022-05-09 à 13 54 23

I did create an issue in Babel's repository. However, since regenerator is used by more than just Babel, and that this behavior can also affect other tools, I believe it would be better for regenerator-runtime to read the Symbol values wen invoked rather than when loaded. What do you think ?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions