fix(sidebar): fix sidebar when you open a nested link (#73)

pull/77/head
Carlos Rodrigues 4 years ago committed by GitHub
parent 39dbd7806e
commit d2b6d39228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)

Loading…
Cancel
Save