Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): prevent calling devMode only function on @defer error. #56559

Closed
wants to merge 1 commit into from

Conversation

JeanMeche
Copy link
Member

@JeanMeche JeanMeche commented Jun 23, 2024

getTemplateLocationDetails() is a devMode only function and should be guarded by ngDevMode or invoking it will throw an error.

fixes #56558

@JeanMeche JeanMeche added the area: core Issues related to the framework runtime label Jun 23, 2024
@ngbot ngbot bot added this to the Backlog milestone Jun 23, 2024
@JeanMeche
Copy link
Member Author

Note: It might be worth adding a test to cover that. It looks like we have no test that covers the DEFER_LOADING_FAILED error.

Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

@JeanMeche thanks for the fix 👍

@AndrewKushnir
Copy link
Contributor

Note: It might be worth adding a test to cover that. It looks like we have no test that covers the DEFER_LOADING_FAILED error.

If we are missing tests for the failed loading scenario (specifically when there is no @error template provided) - it'd be great to add them, but let's do it in a separate PR.

@AndrewKushnir AndrewKushnir added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews target: patch This PR is targeted for the next patch release labels Jun 23, 2024
@AndrewKushnir
Copy link
Contributor

@JeanMeche there is a failing test CI job, which needs an update to symbol golden files. Could you please take a look when you get a chance?

`getTemplateLocationDetails()` is a devMode only function and should guarded by `ngDevMode` or calling it will throw an error.

fixes angular#56558
@AndrewKushnir
Copy link
Contributor

Presubmit.

@AndrewKushnir AndrewKushnir added action: presubmit The PR is in need of a google3 presubmit and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Jun 23, 2024
@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker and removed action: presubmit The PR is in need of a google3 presubmit labels Jun 23, 2024
@dylhunn
Copy link
Contributor

dylhunn commented Jun 25, 2024

This PR was merged into the repository by commit 5be16d0.

The changes were merged into the following branches: main, 18.0.x

dylhunn pushed a commit that referenced this pull request Jun 25, 2024
…56559)

`getTemplateLocationDetails()` is a devMode only function and should guarded by `ngDevMode` or calling it will throw an error.

fixes #56558

PR Close #56559
@dylhunn dylhunn closed this in 5be16d0 Jun 25, 2024
@angular-automatic-lock-bot
Copy link

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 Jul 26, 2024
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: 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.

'Must never be called in production mode'
3 participants