FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(router): fall back when serializing protocol-relative URLs by SkyZeroZx · Pull Request #70257 · angular/angular · GitHub

fix(router): fall back when serializing protocol-relative URLs - #70257

Open
SkyZeroZx wants to merge 1 commit into
angular:mainfrom
SkyZeroZx:fix/router-relative-url
Open

fix(router): fall back when serializing protocol-relative URLs#70257
SkyZeroZx wants to merge 1 commit into
angular:mainfrom
SkyZeroZx:fix/router-relative-url

Conversation

Copy link
Copy Markdown
Contributor

Avoid throwing when DefaultUrlSerializer encounters a UrlTree that would serialize to a protocol-relative URL. The exception surfaced existing test data and mistaken command construction as a breaking change after #69874.

Warn in development mode and serialize the tree as "/" instead. Keep the browser-facing URL root-relative without changing command or route-recognition semantics.

The original fix had to be reverted after a regression surfaced in g3

See #69874 (comment)

This uses the less disruptive fallback proposed in #69874 (comment)

Fixes #69700

Avoid throwing when DefaultUrlSerializer encounters a UrlTree that would serialize to a protocol-relative URL. The exception surfaced existing test data and mistaken command construction as a breaking change after angular#69874.

Warn in development mode and serialize the tree as "/" instead. Keep the browser-facing URL root-relative without changing command or route-recognition semantics.

The original fix had to be reverted after a regression surfaced in g3:
angular#69874 (comment)

This uses the less disruptive fallback proposed in the follow-up discussion:
angular#69874 (comment)

Fixes angular#69700
ngbot Bot added this to the Backlog milestone Aug 18, 2026
SkyZeroZx marked this pull request as ready for review August 18, 2026 19:09
pullapprove Bot requested a review from kirjs August 18, 2026 19:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RouterLink can serialize internal route commands into protocol-relative external hrefs

1 participant


Back | FazBrowse Home | New Git URL