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,15 +49,17 @@
}) })
} }
const toc: TocItem[] = $page.error const toc: TocItem[] = $derived(
? [ $page.error
{ ? [
id: "_top", {
title: "Overview", id: "_top",
level: 2, title: "Overview",
}, level: 2,
] },
: ($page.data.toc ?? []) ]
: ($page.data.toc ?? []),
)
</script> </script>
<svelte:window on:scroll={handleScroll} /> <svelte:window on:scroll={handleScroll} />