Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 192017b

Browse files
authored
fix(theme): fix auto-sidebar collapsed (#746)
1 parent cfa7032 commit 192017b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

theme/src/node/prepare/prepareSidebar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function getAutoDirSidebar(
171171
current.icon = frontmatter.icon as ThemeIcon
172172
}
173173
if (parent?.items?.length) {
174-
parent.collapsed = false
174+
parent.collapsed ??= false
175175
}
176176
parent = current
177177
items = current.items as ResolvedSidebarItem[]

0 commit comments

Comments
 (0)