Skip to content

Commit b7af48a

Browse files
committed
chore: hide pageoutline when nothing to show
1 parent 9251096 commit b7af48a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/views/PageView.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ watch(
7272
isCurrentIndexPage.value = isIndexPage
7373
title.value = currentPage.value?.title ? currentPage.value.title : pageCategory.value
7474
Content.value = LoadingView as never
75-
pageOutlineData.value = []
7675
const module = await resolvePageModule(currentPage.value?.sourceUrl || pathname)
7776
pageOutlineData.value = module.__headers ?? []
7877
Content.value = module.default ?? module
@@ -233,6 +232,7 @@ function validateHeaderElements() {
233232
<PageOutline
234233
hidden
235234
xl:block
235+
v-if="pageOutlineData.length"
236236
:page-outline="pageOutlineData"
237237
:highlighted-slug="highlightedSlug"
238238
/>

0 commit comments

Comments
 (0)