Skip to content

Commit

Permalink
perf(theme): 右侧边栏添加 headers 判断控制显示
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo committed Feb 26, 2024
1 parent ecd2064 commit ba899ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion theme/src/client/composables/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function useSidebar() {
})

const hasAside = computed(() => {
return !frontmatter.value.home && frontmatter.value.aside !== false
return !frontmatter.value.home && frontmatter.value.aside !== false && page.value.headers.length
})

const isSidebarEnabled = computed(() => hasSidebar.value && is960.value)
Expand Down

0 comments on commit ba899ec

Please sign in to comment.