This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Description
The following code doesn't work properly on page load:
<script context="module">
export async function preload(page, session) {
console.log(session) // undefined on page load!
const res = await this.fetch(`private/needsession`); // user session needed for this get request
const article = await res.json();
return { article };
}
</script>
Sapper version: 0.27.9
I'm trying to make a get request by the user session using preload
Another example with realworld same issue occurs