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

pull/73/head
pikax 5 years ago
parent 5419abdcc6
commit 15eb821526

@ -129,7 +129,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