diff --git a/packages/@vuepress/theme-default/util/index.js b/packages/@vuepress/theme-default/util/index.js index c74c9219bc..db331efa3c 100644 --- a/packages/@vuepress/theme-default/util/index.js +++ b/packages/@vuepress/theme-default/util/index.js @@ -222,7 +222,7 @@ function resolveItem (item, pages, base, groupDepth = 1) { ) } const children = item.children || [] - if (children.length === 0) { + if (children.length === 0 && item.path) { return Object.assign(resolvePage(pages, item.path, base), { title: item.title })