Skip to content

Commit

Permalink
[MWPW-136078] Ensure breadcrumbs based on URL are built (#1224)
Browse files Browse the repository at this point in the history
  • Loading branch information
overmyheadandbody authored Sep 7, 2023
1 parent 527b4de commit 2420896
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libs/blocks/global-navigation/global-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,8 @@ class Gnav {
if (!this.el.classList.contains('has-breadcrumbs')) return null;
if (this.elements.breadcrumbsWrapper) return this.elements.breadcrumbsWrapper;
const breadcrumbsElem = this.el.querySelector('.breadcrumbs');
if (!breadcrumbsElem) return null;
// Breadcrumbs are not initially part of the nav, need to decorate the links
decorateLinks(breadcrumbsElem);
if (breadcrumbsElem) decorateLinks(breadcrumbsElem);
const createBreadcrumbs = await loadBlock('../features/breadcrumbs/breadcrumbs.js');
this.elements.breadcrumbsWrapper = await createBreadcrumbs(breadcrumbsElem);
return this.elements.breadcrumbsWrapper;
Expand Down

0 comments on commit 2420896

Please sign in to comment.