Skip to content

head is not executed when beforeLoad throws an Error #4684

Closed

Description

@KiwiKilian

Which project does this relate to?

Router

Describe the bug

Following up on #3657.

When an error is thrown from beforeLoad, head is never executed. Maybe this should be considered, to allow modifying the head, when showing the errorComponent.

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-ydfwwss9?file=src%2Froutes%2F__root.tsx

Steps to Reproduce the Bug or Issue

Open the link and see, the global styles and title set via head are missing.

Expected behavior

head should be executed an included via the shellComponent and HeadContent.

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.128.0

Additional context

Created this issue, as @schiller-manuel told me, it might be a bug 😄.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions