Skip to content

Commit 5f1eb0e

Browse files
committed
fix($theme-default): sidebar group item cannot contain empty children (close: #1278)
1 parent 83ff9ad commit 5f1eb0e

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function resolveItem (item, pages, base, groupDepth = 1) {
222222
)
223223
}
224224
const children = item.children || []
225-
if (children.length === 0) {
225+
if (children.length === 0 && item.path) {
226226
return Object.assign(resolvePage(pages, item.path, base), {
227227
title: item.title
228228
})

0 commit comments

Comments
 (0)