Skip to content

Commit

Permalink
feat($theme-default): fallback current group node to page node if chi…
Browse files Browse the repository at this point in the history
…ldren doesn't exist
  • Loading branch information
ulivz committed Feb 8, 2019
1 parent 3e47a20 commit 11ce576
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/@vuepress/theme-default/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ function resolveItem (item, pages, base, groupDepth = 1) {
)
}
const children = item.children || []
if (children.length === 0) {
return Object.assign(resolvePage(pages, item.path, base), {
title: item.title
})
}
return {
type: 'group',
path: item.path,
Expand Down

0 comments on commit 11ce576

Please sign in to comment.