Skip to content

Commit

Permalink
Update breadcrumbs-overflow.js
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Feb 12, 2025
1 parent ddc968a commit 1f8cc8b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/main/js/components/header/breadcrumbs-overflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,18 @@ export default function computeBreadcrumbs() {
Utils.generateDropdown(
breadcrumbsOverflow,
(instance) => {
const mappedItems = items.map((e) => ({
type: "link",
label: e.textContent,
url: e.querySelector("a")?.href,
}));
const mappedItems = items.map((e) => {
let href = e.querySelector("a");
if (href) {
href = href.href;
}

return {
type: "link",
label: e.textContent,
url: href,
};
});

instance.setContent(Utils.generateDropdownItems(mappedItems));
},
Expand Down

0 comments on commit 1f8cc8b

Please sign in to comment.