Skip to content

Commit 11ce576

Browse files
committed
feat($theme-default): fallback current group node to page node if children doesn't exist
1 parent 3e47a20 commit 11ce576

File tree

1 file changed

+5
-0
lines changed
  • packages/@vuepress/theme-default/util

1 file changed

+5
-0
lines changed

packages/@vuepress/theme-default/util/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,11 @@ function resolveItem (item, pages, base, groupDepth = 1) {
222222
)
223223
}
224224
const children = item.children || []
225+
if (children.length === 0) {
226+
return Object.assign(resolvePage(pages, item.path, base), {
227+
title: item.title
228+
})
229+
}
225230
return {
226231
type: 'group',
227232
path: item.path,

0 commit comments

Comments
 (0)