-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedPRs welcomed. The implementation details are unlikely to cause debatePRs welcomed. The implementation details are unlikely to cause debateload / layout
Milestone
Description
Describe the bug
When error (or status !== 2xx) is included in the returned object from a load function inside a route, while also providing a stuff object, the $page.stuff store is empty.
Reproduction
https://github.com/flavioosh/sveltekit-stuff-error-repro
Logs
No response
System Info
System:
OS: Linux 5.18 Arch Linux
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Memory: 23.23 GB / 31.27 GB
Container: Yes
Shell: 5.9 - /usr/bin/zsh
Binaries:
Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
npm: 8.14.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
Browsers:
Firefox: 102.0.1
npmPackages:
@sveltejs/adapter-auto: next => 1.0.0-next.60
@sveltejs/kit: next => 1.0.0-next.374
svelte: ^3.44.0 => 3.49.0
vite: ^3.0.0 => 3.0.0Severity
serious, but I can work around it
Additional Information
I'm not sure if this is expected behaviour, but it seems that even if the object returned from a load function contains either error or a non-200 status, we should still get the stuff passed through to the layout or error pages. I'm not sure if I'm doing something wrong but this seems counter-intuitive.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedPRs welcomed. The implementation details are unlikely to cause debatePRs welcomed. The implementation details are unlikely to cause debateload / layout