Skip to content

2.22.3: issues with redirect #13976

@frederikhors

Description

@frederikhors

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

https://stackblitz.com/edit/sveltejs-kit-template-default-tbzr2tku

Severity

blocking all usage of SvelteKit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions