Skip to content

Commit

Permalink
fix($theme-default): sidebarDepth: 0 not working in YAML (close: #1701)…
Browse files Browse the repository at this point in the history
… (#1702)
  • Loading branch information
DEULOS authored and ulivz committed Jul 29, 2019
1 parent e3393e3 commit 0624828
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/@vuepress/theme-default/components/SidebarLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ export default {
? renderExternal(h, item.path, item.title || item.path)
: renderLink(h, item.path, item.title || item.path, active)
const configDepth = $page.frontmatter.sidebarDepth
|| sidebarDepth
|| $themeLocaleConfig.sidebarDepth
|| $themeConfig.sidebarDepth
const maxDepth = configDepth == null ? 1 : configDepth
const maxDepth = [
$page.frontmatter.sidebarDepth,
sidebarDepth,
$themeLocaleConfig.sidebarDepth,
$themeConfig.sidebarDepth,
1
].find(depth => depth !== undefined);
const displayAllHeaders = $themeLocaleConfig.displayAllHeaders
|| $themeConfig.displayAllHeaders
Expand Down

0 comments on commit 0624828

Please sign in to comment.