You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm exporting a load function in $layout.svelte
Somehow, context is always an empty object - but the getContext function inside hooks/index.ts is called fine
The session variable works as expected.
hooks/index.ts
importlanguageParserfrom'accept-language-parser';exportasyncfunctiongetContext({ headers }){letlang=languageParser.parse(headers["accept-language"]);return{
lang
};}exportfunctiongetSession({ context }){returncontext}
I'm exporting a load function in $layout.svelte
Somehow, context is always an empty object - but the getContext function inside hooks/index.ts is called fine
The session variable works as expected.
hooks/index.ts
routes/$layout.svelte
SvelteKit v1.0.0-next.94
The text was updated successfully, but these errors were encountered: