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
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