Skip to content

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

Open
atscott wants to merge 1 commit intoangular:mainfrom
atscott:zonepromisetry
Open

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

Conversation

@atscott
Copy link
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

2 participants