Skip to content

Conversation

@thePunderWoman
Copy link
Contributor

Hydrate triggers were firing in CSR cases and attempting to find parent defer blocks. This prevents that from happening. In these cases, the defer block id will be empty.

fixes: #58359

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Issue Number: #58359

Does this PR introduce a breaking change?

  • Yes
  • No

@thePunderWoman thePunderWoman added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: rc This PR is targeted for the next release-candidate labels Oct 25, 2024
@ngbot ngbot bot modified the milestone: Backlog Oct 25, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 25, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 25, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 25, 2024
@ngbot ngbot bot modified the milestone: Backlog Oct 25, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 25, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd propose adding a TODO here to refactor the code (resolving circular deps if needed), so that we don't have to have this callback function (it should probably be inside of the incrementallyHydrateFromBlockName one).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The initial circular dep problem is actually why this function is here at all. It was initially in the proposed location and wasn't resolvable without extracting this into a function like this. These are the cleanup fns. I can add a TODO though.

@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 28, 2024
@ngbot ngbot bot modified the milestone: Backlog Oct 28, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 28, 2024
@ngbot ngbot bot modified the milestone: Backlog Oct 28, 2024
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.

LGTM with a minor comment.

@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 28, 2024
@ngbot ngbot bot modified the milestone: Backlog Oct 28, 2024
@thePunderWoman thePunderWoman 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 Oct 28, 2024
hydrate triggers were firing in CSR cases and attempting to find parent defer blocks. This prevents that from happening. In these cases, the defer block id will be empty.

fixes: angular#58359
This adds a shouldHydrate check that prevents any additional work in cases when hydration is not necessary.
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 28, 2024
@ngbot ngbot bot modified the milestone: Backlog Oct 28, 2024
@alxhub
Copy link
Member

alxhub commented Oct 29, 2024

This PR was merged into the repository by commit 2e11b6f.

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

alxhub pushed a commit that referenced this pull request Oct 29, 2024
…58366)

hydrate triggers were firing in CSR cases and attempting to find parent defer blocks. This prevents that from happening. In these cases, the defer block id will be empty.

fixes: #58359

PR Close #58366
alxhub pushed a commit that referenced this pull request Oct 29, 2024
This adds a shouldHydrate check that prevents any additional work in cases when hydration is not necessary.

PR Close #58366
@alxhub alxhub closed this in acd4f80 Oct 29, 2024
alxhub pushed a commit that referenced this pull request Oct 29, 2024
This adds a shouldHydrate check that prevents any additional work in cases when hydration is not necessary.

PR Close #58366
@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 Nov 29, 2024
@thePunderWoman thePunderWoman deleted the hydrate-bug branch March 6, 2025 20:06
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: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incremental Hydration throws error - Cannot read properties of undefined (reading 'p') on Client Side Navigation to this page

3 participants