Please sign in to comment.
fix(router): avoid freezing queryParams in-place (#22663)
The recognizer code used to call Object.freeze() on queryParams before using them to construct ActivatedRoutes, with the intent being to help avoid common invalid usage. Unfortunately, Object.freeze() works in-place, so this was also freezing the queryParams on the actual UrlTree object, making it more difficult to manipulate UrlTrees in things like UrlHandlingStrategy. This change simply shallow-copies the queryParams before freezing them. Fixes #22617 PR Close #22663
- Loading branch information...
Showing with 13 additions and 4 deletions.