Skip to content

Commit

Permalink
fix(sidebar): fix sidebar when you open a nested link (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
pikax authored Sep 3, 2020
1 parent 39dbd78 commit d2b6d39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/theme-default/components/SideBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ function resolveMultiSidebar(
headers: Header[],
depth: number
): ResolvedSidebar {
const item = config[getPathDirName(path)]
const paths = [path, Object.keys(config)[0]]
const item = paths.map((x) => config[getPathDirName(x)]).find(Boolean)

if (Array.isArray(item)) {
return resolveArraySidebar(item, depth)
Expand Down

0 comments on commit d2b6d39

Please sign in to comment.