Skip to content

Commit

Permalink
Adding lanalog when there is mismatch with content and name
Browse files Browse the repository at this point in the history
  • Loading branch information
bandana147 committed Nov 25, 2024
1 parent e79b9e6 commit 02581f6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libs/blocks/global-navigation/global-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,12 @@ class Gnav {
if (this.elements.localNav || !this.newMobileNav || isDesktop.matches) {
localNavItems[0].querySelector('a').textContent = title.trim();
} else {
const localNav = document.querySelector('.feds-localnav');
let localNav = document.querySelector('.feds-localnav');
if (!localNav) {
lanaLog({ message: `GNAV: Localnav does not include 'localnav' in its name.`, tags: 'errorType=info,module=gnav' });
localNav = toFragment`<div class="feds-localnav"/>`;
this.block.after(localNav);
}
localNav.append(toFragment`<button class="feds-navLink--hoverCaret feds-localnav-title"></button>`, toFragment` <div class="feds-localnav-items"></div>`);

const itemWrapper = localNav.querySelector('.feds-localnav-items');
Expand Down

0 comments on commit 02581f6

Please sign in to comment.