Skip to content

Commit 86268c3

Browse files
committed
fix: restore docs sidebar navigation fallback
Handle sanitized docs root entries without /docs path by falling back to the first node with children, so the docs menu remains visible. Made-with: Cursor
1 parent b8f4f36 commit 86268c3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/layouts/docs.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ const navigationDisplay = inject<ComputedRef<ContentNavigationItem[]>>(
66
computed(() => []),
77
);
88
const docsNavigation = computed(
9-
() => navigationDisplay.value.find((item) => item.path === '/docs')?.children || [],
9+
() =>
10+
navigationDisplay.value.find((item) => item.path === '/docs')?.children ||
11+
navigationDisplay.value.find((item) => item.children?.length)?.children ||
12+
[],
1013
);
1114
</script>
1215

0 commit comments

Comments
 (0)