Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(@angular/ssr): check whether injector is destroyed#30738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
arturovt wants to merge1 commit intoangular:main
base:main
Choose a base branch
Loading
fromarturovt:fix/injector-destroyed

Conversation

arturovt
Copy link
Contributor

In this commit, we check whether the injector is destroyed before calling toenvInjector.get. The application might be destroyed andwhenStable() would resolve immediately; as thus, calling toinjector.get is unsafe and should be guarded.

In this commit, we check whether the injector is destroyed before calling to `envInjector.get`. The application might be destroyed and `whenStable()` would resolve immediately; as thus, calling to `injector.get` is unsafe and should be guarded.
@clydinclydin requested a review fromalan-agius4July 18, 2025 18:05
@clydinclydin added the action: reviewThe PR is still awaiting reviews from at least one requested reviewer labelJul 18, 2025
constrouterIsProvided=!!envInjector.get(ActivatedRoute,null);
constrouter=envInjector.get(Router);
constlastSuccessfulNavigation=router.lastSuccessfulNavigation;
constrouterIsProvided=destroyed ?false :!!envInjector.get(ActivatedRoute,null);
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the case when the applicationRef gets destroyed before the rendering phase? Internally in

renderInternal(platformRef,applicationRef)
the environment injector is also required to render the app.

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

@alan-agius4alan-agius4alan-agius4 left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
action: reviewThe PR is still awaiting reviews from at least one requested reviewerarea: @angular/ssr
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@arturovt@alan-agius4@clydin

[8]ページ先頭

©2009-2025 Movatter.jp