mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-01 00:48:02 +02:00
chore: tighten ESLint config (#6931)
* chore: tighten ESLint config * more refactor * refactor push * fix
This commit is contained in:
parent
f70ddf7e69
commit
cc0bceab9c
54 changed files with 177 additions and 193 deletions
|
@ -199,14 +199,12 @@ function getBreadcrumbs({
|
|||
function extract(items: PropSidebar) {
|
||||
for (const item of items) {
|
||||
if (
|
||||
item.type === 'category' &&
|
||||
(isSamePath(item.href, pathname) || extract(item.items))
|
||||
(item.type === 'category' &&
|
||||
(isSamePath(item.href, pathname) || extract(item.items))) ||
|
||||
(item.type === 'link' && isSamePath(item.href, pathname))
|
||||
) {
|
||||
breadcrumbs.push(item);
|
||||
return true;
|
||||
} else if (item.type === 'link' && isSamePath(item.href, pathname)) {
|
||||
breadcrumbs.push(item);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue