Skip to content

The isThenable function inside zone.js cause an unexpected exception #57385

@Qiupengcheng

Description

@Qiupengcheng

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

zone.js

Is this a regression?

Yes

Description

As the image below shows, when I call Promise.all with a callback, when the returns of the callback include a property named then, it will throw an error...

I check the source code of zone.js, the function isThenable in the file packages/zone.js/lib/common/promise.ts is not very robust. I'm not sure why not check if .then is a function?

image

Look forward to your response, thanks a lot.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

image

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

No response

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions