From 8b920c2b6e2ba2d36230c9a020cebed90e16a09b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Wed, 8 Mar 2023 20:26:45 +0100 Subject: [PATCH] fix: show aside when level 0 and one parent only --- components/docs/DocsPageLayout.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/docs/DocsPageLayout.vue b/components/docs/DocsPageLayout.vue index 0b2edee83..ad5eb9331 100644 --- a/components/docs/DocsPageLayout.vue +++ b/components/docs/DocsPageLayout.vue @@ -11,7 +11,7 @@ const fallbackValue = (value: string, fallback = true) => { const hasBody = computed(() => !page.value || page.value?.body?.children?.length > 0) const hasToc = computed(() => page.value?.toc !== false && page.value?.body?.toc?.links?.length >= 2) -const hasAside = computed(() => page.value?.aside !== false && tree.value?.length > 1) +const hasAside = computed(() => page.value?.aside !== false && (tree.value?.length > 1 || tree.value?.[0]?.children?.length)) const bottom = computed(() => fallbackValue('bottom', true)) const isOpen = ref(false)