From af4bb52947d9454e71ce63c06c5efe814410209b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=83=BD=E5=AE=81?= Date: Wed, 10 May 2023 23:30:26 +0800 Subject: [PATCH] refactor: simplify `hasAside` computed property (#2356) --- src/client/theme-default/composables/sidebar.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/theme-default/composables/sidebar.ts b/src/client/theme-default/composables/sidebar.ts index df307d3c..a99d317e 100644 --- a/src/client/theme-default/composables/sidebar.ts +++ b/src/client/theme-default/composables/sidebar.ts @@ -60,8 +60,7 @@ export function useSidebar() { const hasAside = computed(() => { if (frontmatter.value.layout === 'home') return false if (frontmatter.value.aside != null) return !!frontmatter.value.aside - if (theme.value.aside === false) return false - return true + return theme.value.aside !== false }) const isSidebarEnabled = computed(() => hasSidebar.value && is960.value)