fix(website): missing $derive for toc

This commit is contained in:
LukaDev 2024-10-29 19:10:53 +01:00
parent 939f59d99e
commit e5e4667a48

View file

@ -49,7 +49,8 @@
})
}
const toc: TocItem[] = $page.error
const toc: TocItem[] = $derived(
$page.error
? [
{
id: "_top",
@ -57,7 +58,8 @@
level: 2,
},
]
: ($page.data.toc ?? [])
: ($page.data.toc ?? []),
)
</script>
<svelte:window on:scroll={handleScroll} />