Skip to content

fix(zone.js): support passthrough of Promise.try API#67059

Merged
mattrbeck merged 1 commit intoangular:mainfrom
atscott:zonepromisetry
Feb 17, 2026
Merged

fix(zone.js): support passthrough of Promise.try API#67059
mattrbeck merged 1 commit intoangular:mainfrom
atscott:zonepromisetry

Conversation

@atscott
Copy link
Copy Markdown
Contributor

@atscott atscott commented Feb 13, 2026

When Zone patches Promise, it uses ZoneAwarePromise. The new Promise.try API was undefined on ZoneAwarePromise, making it unavailable when zone was present. This change gracefully passes through Promise.try to the native Promise implementation, if available, without patching it to execute in the right zone (our stance is not to add new patches but avoid destructively making new APIs unavailable).

Fixes #67057

@atscott atscott added the target: patch This PR is targeted for the next patch release label Feb 13, 2026
@angular-robot angular-robot Bot added the area: zones Issues related to zone.js label Feb 13, 2026
@ngbot ngbot Bot added this to the Backlog milestone Feb 13, 2026
@atscott atscott requested a review from dgp1130 February 13, 2026 17:47
Comment thread packages/zone.js/lib/common/promise.ts
When Zone patches Promise, it uses ZoneAwarePromise. The new Promise.try API was undefined on ZoneAwarePromise, making it unavailable when zone was present. This change gracefully passes through Promise.try to the native Promise implementation, if available, without patching it to execute in the right zone (our stance is not to add new patches but avoid destructively making new APIs unavailable).

Fixes angular#67057
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Feb 17, 2026
@mattrbeck mattrbeck merged commit fc557f0 into angular:main Feb 17, 2026
20 checks passed
@mattrbeck
Copy link
Copy Markdown
Member

This PR was merged into the repository. The changes were merged into the following branches:

@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Mar 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: zones Issues related to zone.js target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(zone.js) Promise.try is undefined

3 participants