Skip to content

Conversation

@atscott
Copy link
Contributor

@atscott atscott commented Jan 2, 2026

Mutating the UrlTree that is returned by createUrlTree can cause the input, which might even be an active route, to be mutated. This ensures the UrlSegments are recreated and do not mutate the input.

fixes #54624

Mutating the `UrlTree` that is returned by `createUrlTree` can cause the
input, which might even be an active route, to be mutated. This ensures
the `UrlSegment`s are recreated and do not mutate the input.

fixes angular#54624
@atscott atscott added area: router target: patch This PR is targeted for the next patch release labels Jan 2, 2026
@ngbot ngbot bot added this to the Backlog milestone Jan 2, 2026
@atscott atscott requested a review from JeanMeche January 5, 2026 17:57
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Jan 5, 2026
@kirjs kirjs merged commit 39efb62 into angular:main Jan 6, 2026
23 checks passed
@kirjs
Copy link
Contributor

kirjs commented Jan 6, 2026

This PR was merged into the repository. The changes were merged into the following branches:

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

Labels

action: merge The PR is ready for merge by the caretaker area: router target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Router.createUrlTree(...) creates new UrlTree which reuses UrlSegmentGroups from the Router.currentUrlTree

3 participants