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

core-js es6.promise conflicts with ZoneAwarePromise #783

Closed
@hmdhk

Description

@hmdhk

Importing core-js/shim after zone.js would cause certain properties of ZoneAwarePromise to be overwritten. Eventually it will end up in the wrong zone.

Example:

import 'zone.js';
import 'core-js/shim';

window.Zone.current.fork({name:'new zone'}).run(function (){
    Promise.resolve().then(resp => {
      console.log(window.Zone.current.name) // it's <root> zone!
    })
})

It seems like importing core-js/shim first would resolve the issue. But I'm not sure about side effects of importing zone.js after core-js/shim.

Could this issue be fixed regardless of importing order?

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