Skip to content

Commit

Permalink
fix breadcrumb
Browse files Browse the repository at this point in the history
  • Loading branch information
sstraatemans committed Oct 26, 2023
1 parent 7a56ce9 commit 3b00039
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/apps/docs/src/components/Breadcrumbs/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const Breadcrumbs: FC<IProps> = ({ menuItems }) => {
const checkSubTree = (subTree: IMenuItem[]): void => {
const item = subTree.find((i) => i.isMenuOpen);

if (!item) return;
if (!item || item.root === lastItem?.root) return;
lastItem = item;
const menuStr = item.children.length > 0 ? item.menu : item.label;
tree.push({
Expand All @@ -34,7 +34,11 @@ export const Breadcrumbs: FC<IProps> = ({ menuItems }) => {

checkSubTree(menuItems);

if (lastItem && lastItem.isIndex) {
if (
lastItem &&
lastItem.isIndex &&
tree[tree.length - 1].title.toLowerCase() !== lastItem.label.toLowerCase()
) {
tree.push({
root: lastItem.root,
title: lastItem.label,
Expand Down

0 comments on commit 3b00039

Please sign in to comment.