-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed as duplicate of#14387
Closed as duplicate of#14387
Copy link
Description
Describe the bug
After upgrading from @sveltejs/[email protected] to 2.37.1, I noticed that if a +page.ts load function throws error(), then in the browser the +layout.ts load function receives event.data as null.
This regression did not occur in 2.37.0 and happens in 2.37.1 and all later versions(2.38.1).
Reproduction
-
Create
src/routes/some/path/+page.js:import { error } from '@sveltejs/kit'; export async function load() { throw error(404, 'Not found'); }
-
In
src/routes/+layout.js:export async function load(event) { console.log('layout data:', event.data); // This should contain the data set in +layout.server.js. return {}; }
-
Navigate to /some/path in the browser.
Logs
System Info
System:
OS: macOS 15.6.1
CPU: (8) arm64 Apple M1
Memory: 1.84 GB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.7.0 - /opt/homebrew/bin/node
npm: 11.5.1 - /opt/homebrew/bin/npm
pnpm: 10.15.1 - /opt/homebrew/bin/pnpm
Browsers:
Brave Browser: 140.1.82.161
Chrome: 140.0.7339.133
Safari: 18.6
npmPackages:
@sveltejs/adapter-vercel: ^5.10.2 => 5.10.2
@sveltejs/kit: ^2.37.1 => 2.37.1
@sveltejs/vite-plugin-svelte: ^6.2.0 => 6.2.0
svelte: ^5.38.10 => 5.38.10
vite: ^7.1.5 => 7.1.5Severity
blocking an upgrade
Additional Information
No response
Metadata
Metadata
Assignees
Labels
No labels