From 5f1eb0e799cf530e00cc1a5838b136bd4f73593c Mon Sep 17 00:00:00 2001 From: ULIVZ <472590061@qq.com> Date: Thu, 14 Feb 2019 01:03:51 +0800 Subject: [PATCH] fix($theme-default): sidebar group item cannot contain empty children (close: #1278) --- packages/@vuepress/theme-default/util/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 })