mirror of
https://github.com/pesde-pkg/pesde.git
synced 2025-05-04 10:33:47 +01:00
fix(website): missing $derive for toc
This commit is contained in:
parent
939f59d99e
commit
e5e4667a48
1 changed files with 11 additions and 9 deletions
|
@ -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} />
|
||||
|
|
Loading…
Add table
Reference in a new issue