From 3cb2bfeba932b23633f609984a1d51a172e2c646 Mon Sep 17 00:00:00 2001 From: Bandana Laishram Date: Wed, 27 Nov 2024 20:25:37 +0530 Subject: [PATCH] Temp window url for testing --- libs/blocks/global-navigation/global-navigation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/blocks/global-navigation/global-navigation.js b/libs/blocks/global-navigation/global-navigation.js index 0461d63d5c..52b49cfb8b 100644 --- a/libs/blocks/global-navigation/global-navigation.js +++ b/libs/blocks/global-navigation/global-navigation.js @@ -1199,7 +1199,8 @@ class Gnav { export default async function init(block) { const { mep } = getConfig(); const sourceUrl = await getGnavSource(); - const newMobileNav = new URLSearchParams(window.location.search).get('newNav') === 'true' || getMetadata('mobile-gnav-v2') !== 'false'; + let newMobileNav = new URLSearchParams(window.location.search).get('newNav'); + newMobileNav = newMobileNav ? newMobileNav !== 'false' : getMetadata('mobile-gnav-v2') !== 'false'; const [url, hash = ''] = sourceUrl.split('#'); if (hash === '_noActiveItem') { setDisableAEDState();