router: Failed to reset error component properly

Describe the bug

I can’t reset the error component neither through navigation nor through router.load().

Your Example Website or App

https://stackblitz.com/github/Zebeqo/tsr-reset-error-component

Steps to Reproduce the Bug or Issue

case 1

  1. Click on the link to /a
  2. Click Trigger error component to display the error component of /a
  3. Click the link to /b in the error component of /a displays the default error component when /b does not raise an error

case 2

  1. Click on the link to /a
  2. Click Trigger error component to display the error component of /a
  3. Clicking router.load() or the link to /a in the error component of /a still displays the error component.

Expected behavior

case 1

Show component of b when click the link to /b in the error component of /a.

case 2

Shows component of a when click router.load() or the link to /a in the error component of /a

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 120.0

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 7
  • Comments: 15 (12 by maintainers)

Most upvoted comments

can confirm the issue, I think I’ll have a fix for it up soon.

Also experiencing this on 1.45.6

EDIT: ah this was an old npm version, let me update… can’t make a simple repro with the newer one. (but it still occurs in a more complicated app)

can you please show a minimal stackblitz reproduction of how that happens for you?

Still broken on the latest version. Using a link to navigate away from an error component does not work. (it actually does start “working” for me once you click a second time on another link)