Skip to content

Commit 0856954

Browse files
committed
grrrr
1 parent 7d5b533 commit 0856954

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/components/DocumentLayout.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
import Layout from 'vitepress/dist/client/theme-default/Layout.vue';
1111
import { useSidebar } from 'vitepress/theme';
1212
const layout = ref<typeof Layout | null>(null);
13-
const { toggle, isOpen , close} = useSidebar()
14-
if (isOpen.value) {
15-
close()
16-
}
13+
const { toggle, isOpen, close, hasSidebar } = useSidebar()
14+
if (hasSidebar.value)
15+
if (isOpen.value) {
16+
close()
17+
}
1718
</script>

0 commit comments

Comments
 (0)