Skip to content

Fix hydration cleanup let declarations - #71141

Open
sod wants to merge 1 commit into
angular:mainfrom
sod:fix-hydration-cleanup-let-declarations
Open

sod wants to merge 1 commit into
angular:mainfrom
sod:fix-hydration-cleanup-let-declarations

Conversation

@sod

@sod sod commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

fixes #71138
fixes #59504

Apparently this was already fixed server side via #57816, but not guarded client side.

The added spec shows this error before the fix:

Expected $[6].length = 3 to equal 1.
Unexpected $[6][1] = 'i18nNodes' in array.
Unexpected $[6][2] = 'dehydratedIcuData' in array.

index 6 is the hydration slot in LView.

@pullapprove
pullapprove Bot requested a review from JeanMeche October 2, 2026 15:45
@google-cla

This comment was marked as outdated.

@angular-robot angular-robot Bot added the area: core Issues related to the framework runtime label Oct 2, 2026
@ngbot ngbot Bot added this to the Backlog milestone Oct 2, 2026
@erkamyaman

Copy link
Copy Markdown
Contributor

CLA will be failing until you remove the Claude co-auth from the commits

`cleanupLView` walks the LView slots and recurses into every value that
looks like an LView or LContainer. Let declarations store arbitrary values
in those slots, so an array of objects stored in a `@let` that is read from
a nested view was treated as an LView, and `cleanupI18nHydrationData`
wrote `i18nNodes` and `dehydratedIcuData` onto its 7th element. This
silently mutated application data, or threw if the data was frozen.

Let declarations are now skipped, the same way `annotateLView` already
@sod
sod force-pushed the fix-hydration-cleanup-let-declarations branch from 85730c2 to a1d16fd Compare October 2, 2026 15:54
@sod

sod commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Squashed the commits and removed the claude opus 5.5 annotation.

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

Labels

area: core Issues related to the framework runtime

Projects

None yet

2 participants