Skip to content

Route Snapshot fragment is sometimes null and sometimes undefined #29391

@gak10100

Description

@gak10100

🐞 bug report

Affected Package

The issue is caused by package @angular/router

Is this a regression?

No

Description

Sometimes the route snapshot fragment is null and sometimes its undefined for the exact same route. This can cause issues down the line when the when the routing code is doing comparisons on the snapshot fragment.

🔬 Minimal Reproduction

https://stackblitz.com/edit/angular-8vqamz
  1. Click A - You will see an output of "A - undefined"
  2. Click Reload - You will see an output of "A - null"

🌍 Your Environment

7.2.5

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions