Skip to content

Hydration cleanup mutates arrays stored in @let when the @let is read from a nested view #71138

Description

@sod

I have no idea what is going on here, but here a reproduction.

I only noticed because i used an array in a @let that was frozen, and hence the browser threw an exception when angular tried to mutate my frozen array during hydration.

I spare you all the investigation wall of text by claude. I figured all you need is the reproduction.

Please provide a link to a minimal reproduction of the bug

https://github.com/sod/issue-hydration-side-effect

Please provide the exception or error you saw

Image Image

Please provide the environment you discovered this bug in (run ng version)

Angular CLI       : 22.2.1
Angular           : 22.2.1
Node.js           : 26.8.1
Package Manager   : yarn 4.18.0
Operating System  : darwin arm64

┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package                   │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build            │ 22.2.1            │ ^22.2.0           │
│ @angular/cli              │ 22.2.1            │ ^22.2.0           │
│ @angular/common           │ 22.2.1            │ ^22.2.0           │
│ @angular/compiler         │ 22.2.1            │ ^22.2.0           │
│ @angular/compiler-cli     │ 22.2.1            │ ^22.2.0           │
│ @angular/core             │ 22.2.1            │ ^22.2.0           │
│ @angular/forms            │ 22.2.1            │ ^22.2.0           │
│ @angular/platform-browser │ 22.2.1            │ ^22.2.0           │
│ @angular/platform-server  │ 22.2.1            │ ^22.2.0           │
│ @angular/router           │ 22.2.1            │ ^22.2.0           │
│ @angular/ssr              │ 22.2.1            │ ^22.2.0           │
│ rxjs                      │ 7.8.2             │ ~7.8.0            │
│ typescript                │ 6.0.3             │ ~6.0.2            │
└───────────────────────────┴───────────────────┴───────────────────┘

Anything else?

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues related to the framework runtimegemini-triagedLabel noting that an issue has been triaged by gemini

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions