Skip to content

Commit

Permalink
Picking first string only for localnav title (#3281)
Browse files Browse the repository at this point in the history
* Picking first string only for localnav title

* Lint fix
  • Loading branch information
bandana147 authored Dec 5, 2024
1 parent 7cc4058 commit 82098c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/blocks/global-navigation/global-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ class Gnav {
</div>`;

this.block.append(this.elements.curtain, this.elements.aside, this.elements.topnavWrapper);
// TODO: Remove with mobile redesign code
const firstLocalNavItem = this.elements.navWrapper.querySelector('.feds-nav .feds-navItem:not(.feds-navItem--section) a');
if (firstLocalNavItem) [firstLocalNavItem.textContent] = firstLocalNavItem.textContent.split('|');
};

addChangeEventListeners = () => {
Expand Down

0 comments on commit 82098c7

Please sign in to comment.