Skip to content

Commit

Permalink
Check for localnav
Browse files Browse the repository at this point in the history
  • Loading branch information
bandana147 committed Nov 22, 2024
1 parent b96cb26 commit 2dfaafd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libs/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,11 @@ function decorateHeader() {
const dynamicNavActive = getMetadata('dynamic-nav') === 'on'
&& window.sessionStorage.getItem('gnavSource') !== null;
if (!dynamicNavActive && (baseBreadcrumbs || breadcrumbs || autoBreadcrumbs)) header.classList.add('has-breadcrumbs');
if (getMetadata('is-localnav') === 'true' && getMetadata('mobile-gnav-v2') !== 'false') {
const gnavSource = getMetadata('gnav-source');
const gnavUrl = gnavSource.split('/');
const gnavName = gnavUrl[gnavUrl.length - 1];

if (gnavName.match('localnav') && getMetadata('mobile-gnav-v2') !== 'false') {
// Preserving space to avoid CLS issue
const localNavWrapper = createTag('div', { class: 'feds-localnav' });
header.after(localNavWrapper);
Expand Down

0 comments on commit 2dfaafd

Please sign in to comment.