Svelte

2.22.3: issues with redirect

#13976

Development PR

Issue

Solved
F
frederikhors
Jul 9, 2025, 5:54 PM

From "@sveltejs/kit": "2.22.3" if I use this code in +layout.ts:

export const load: LayoutLoad = ({ url }) => {
    if (some logic) {
        // other logic
        redirect(302, redirect_url);
    }

    // other code
};

I get this error that I do not understand:

Image

Everything is working fine with 2.22.2.

Reproduction

Severity

blocking all usage of SvelteKit

Info

Closed at Jul 10, 2025, 11:34 AM
Assignees None
Labels None
Milestone None

Pro tip: You can prefix GitHub URLs of issues, PRs or discussions with svcl.dev/ to view them on this page! Also try it on a GitHub release ;)