Skip to content

In SPA mode, navigating to a page that triggers a redirect inside onUpdate fails silently #360

@fnimick

Description

@fnimick

Description
Navigating to a page in onUpdate via await goto(....) fails if that page has a client-side load function that calls redirect().

If applicable, a MRE
https://stackblitz.com/edit/superforms-2-testing-qf9uxu?file=src%2Froutes%2F%2Bpage.svelte

In this example, calling await goto('/target'); fails because target/+page.ts has a load function that throws a redirect.

Either calling cancel() first, or instead calling goto('/second-target') which does not have a redirect, works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconfirmedConfirmed bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions