Skip to content

(zone.js) Promise.any is undefined #44393

@tiberiuzuld

Description

@tiberiuzuld

Which @angular/* package(s) are the source of the bug?

core, platform-browser

Is this a regression?

No

Description

Browsers started to support ES2021 Promise.any
Zone.js Does not support it.
Seems like that zone.js overrides the native Promise and does not implement the static any method.

class ZoneAwarePromise<R> implements Promise<R> {

https://kangax.github.io/compat-table/es2016plus/
https://caniuse.com/?search=Promise.any
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/any

Promise.all
 ƒ all(values) {
            return ZoneAwarePromise.allWithCallback(values);
        }
Promise.any
 undefined

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

Promise.any()
VM201:1 Uncaught TypeError: Promise.any is not a function
    at <anonymous>:1:9
(anonymous) @ VM201:1

Please provide the environment you discovered this bug in (run ng version)

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1300.4
@angular-devkit/build-angular   13.0.4
@angular-devkit/core            13.0.4
@angular-devkit/schematics      13.0.4
@angular/cli                    13.0.4
@schematics/angular             13.0.4
rxjs                            7.4.0
typescript                      4.4.4

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions