-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data from +layout.server.ts is null after navigating #6459
Comments
I also opened a similar issue in #6336 and it was supposedly fixed but I am still having the same problem. |
I have the same issue too. From time to time when I navigate on the site it returns |
The same with using depends and invalidate |
Minimal reproduction of the issue: https://stackblitz.com/edit/sveltejs-kit-template-default-qvjxq7?file=src/routes/+page.svelte |
About |
I opened up a discussion on a API change that is related to this issue: #6570 |
I encountered this bug today, --- page.server.js 2022-09-12
+++ page.server.js 2022-09-12
@@ -1,4 +1,5 @@
-export function load() {
+export function load({url}) {
+ url.pathname;
return {
textFromTheServer: `This text comes from the server \`load\` function.
It should remain on screen when we stay on page (even if the client \`load\` is rerun when clicking ABC and DEF links below).` |
* [fix] reuse server data while not reusing client load Fixes #6459 * add back code that got lost during hickup * fix
This still seems to be an issue, even if there is no need to rerun the server load, I'd still expect the data object to stay the same instead of becoming
null
after navigating// +layout.server.ts
//+layout.ts
Will error out after page change
EDIT: Running on next.454
Originally posted by @luhagel in #6349 (comment)
The text was updated successfully, but these errors were encountered: