-
-
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
+layout.server.js not correctly passing data down during client-side hydration #5904
Comments
Seems like it works fine if |
Good to know that the issue doesn't affect If I didn't need to fetch server side data in my layout, that would be fine. Unfortunately |
On first navigation, the load function in In #5883 (reply in thread), Rich Harris wrote that |
I agree - I don't know if changing the title of the issue would confuse somebody that has already seen it once though. Unless the issue extends beyond the I've reduced the reproduction to one which shows the problem in a more minimal way (i.e. without a |
Fixes #5904 - the data property was not unwrapped on the server, resulting in wrong results on client side navigations - the root layout data was ommitted because of a wrong undefined check
#5921 (comment) suggests that it would be good to change the title. Though that will hopefully become a moot point once #5916 is merged and released. |
* [fix] correctly provide server parent data Fixes #5904 - the data property was not unwrapped on the server, resulting in wrong results on client side navigations - the root layout data was ommitted because of a wrong undefined check * more robust tests * Update packages/kit/src/runtime/server/index.js * Update packages/kit/src/runtime/server/index.js * Update packages/kit/src/runtime/server/index.js * deflake * go ham Co-authored-by: Rich Harris <richard.a.harris@gmail.com> Co-authored-by: Rich Harris <hello@rich-harris.dev>
Describe the bug
After client side navigation, calling
await parent()
from within a +page.server.js exported load function returns{"data":null}
instead of the value returned from the +layout.server.js exported load functionReproduction
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered: