Skip to content

fix(core): avoid uncaught promise errors in injectAsync prefetching#69460

Open
crisbeto wants to merge 1 commit into
angular:mainfrom
crisbeto:inject-async-prefetch
Open

fix(core): avoid uncaught promise errors in injectAsync prefetching#69460
crisbeto wants to merge 1 commit into
angular:mainfrom
crisbeto:inject-async-prefetch

Conversation

@crisbeto

Copy link
Copy Markdown
Member

Fixes a minor issue where the preload function in injectAsync might cause an uncaught promise error.

I also fixed that in onIdle we were passing the wrong function into assertInInjectionContext.

Fixes a minor issue where the `preload` function in `injectAsync` might cause an uncaught promise error.

I also fixed that in `onIdle` we were passing the wrong function into `assertInInjectionContext`.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Jun 22, 2026
@angular-robot angular-robot Bot added the area: core Issues related to the framework runtime label Jun 22, 2026
@ngbot ngbot Bot added this to the Backlog milestone Jun 22, 2026
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jun 22, 2026
options
.prefetch()
.then(() => load())
.catch(() => {});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should errors go to the error handler?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants