data propagation (layout->pages) #7292
-
Hi,
Now, it seems to be working to the +page.js where I can read data through Code is here: https://github.com/ethbrno/eb2-website/tree/dev/src/routes/contributors/%5Btype%5D |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You are returning |
Beta Was this translation helpful? Give feedback.
-
Haven't realized that, thanks again :-)
…On Tue, 18 Oct 2022 at 20:25, Simon H ***@***.***> wrote:
You could do { contributors: [] } to override it in the page - but since
it's used in the layout anyway, it doesn't make any difference with regards
to the size of the response.
—
Reply to this email directly, view it on GitHub
<#7292 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABLZODITFKH4XJUVUBG2HLWD3TSHANCNFSM6AAAAAARHEGMQ4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
You are returning
{ data: contributors }
. SvelteKit merges the data from the above layouts into the final output, which is then{ data: .., contributors: .., .. }
. I think you want to return{ contributors: contributors }
(or{ contributors }
) instead, then the data from the layout is properly overridden.