-
Notifications
You must be signed in to change notification settings - Fork 26.3k
fix(core): Prevents trying to trigger incremental hydration on CSR #58366
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
Conversation
33389d0
to
1349acf
Compare
462618d
to
81be4a3
Compare
incrementallyHydrateFromBlockName( | ||
injector, | ||
lDetails[UNIQUE_SSR_ID], | ||
(deferBlock: DeferBlock) => triggerAndWaitForCompletion(deferBlock), |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
81be4a3
to
95d316e
Compare
95d316e
to
35d420f
Compare
35d420f
to
42858d0
Compare
There was a problem hiding this 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.
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.
42858d0
to
2608df9
Compare
This PR was merged into the repository by commit 2e11b6f. The changes were merged into the following branches: main, 19.0.x |
This adds a shouldHydrate check that prevents any additional work in cases when hydration is not necessary. PR Close #58366
This adds a shouldHydrate check that prevents any additional work in cases when hydration is not necessary. PR Close #58366
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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?
What is the current behavior?
Issue Number: #58359
Does this PR introduce a breaking change?