sveltejs / realworld

SvelteKit implementation of the RealWorld app
https://realworld.svelte.dev
MIT License
2.24k stars 353 forks source link

Fixes undefined variable "profile" #132

Closed Juri-Salminen closed 2 years ago

Juri-Salminen commented 2 years ago

The load()-function in +page.js returns the "profile"-object referenced as "data" in +layout.svelte, hence it should be referenced as "data.profile" instead of "profile".

benmccann commented 2 years ago

Did you test this fix to confirm that follow toggling works? It's obviously less broken than the existing code, but I'm not entirely sure it's valid to update data.profile in that manner