From 1551217dd4dc397a8d0b15984f5a684168837410 Mon Sep 17 00:00:00 2001 From: Bandana Laishram Date: Thu, 12 Sep 2024 14:59:49 +0530 Subject: [PATCH] Fix: Lint issues --- libs/blocks/global-navigation/global-navigation.js | 2 +- libs/blocks/global-navigation/utilities/utilities.js | 2 +- libs/navigation/navigation.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/blocks/global-navigation/global-navigation.js b/libs/blocks/global-navigation/global-navigation.js index 4087cb9534..df80745a18 100644 --- a/libs/blocks/global-navigation/global-navigation.js +++ b/libs/blocks/global-navigation/global-navigation.js @@ -323,7 +323,7 @@ class Gnav { } // Dispatching an event when gnav loads and is visible window.dispatchEvent(new CustomEvent('feds:nav.ready')); - + document.addEventListener('click', closeOnClickOutside); isDesktop.addEventListener('change', closeAllDropdowns); }, 'Error in global navigation init', 'errorType=error,module=gnav'); diff --git a/libs/blocks/global-navigation/utilities/utilities.js b/libs/blocks/global-navigation/utilities/utilities.js index 462966a684..5c2831bbd3 100644 --- a/libs/blocks/global-navigation/utilities/utilities.js +++ b/libs/blocks/global-navigation/utilities/utilities.js @@ -331,7 +331,7 @@ export async function fetchAndProcessPlainHtml({ url, shouldDecorateLinks = true e: `${res.statusText} url: ${res.url}`, tags: 'errorType=info,module=utilities', }); - return; + return null; } const text = await res.text(); const { body } = new DOMParser().parseFromString(text, 'text/html'); diff --git a/libs/navigation/navigation.js b/libs/navigation/navigation.js index 81ffa60f9a..ef08f27924 100644 --- a/libs/navigation/navigation.js +++ b/libs/navigation/navigation.js @@ -80,7 +80,7 @@ export default async function loadBlock(configs, customLib) { } }); window.addEventListener('feds:nav.ready', () => onReady && onReady()); - window.addEventListener('feds:nav.error', ({ detail }) => onError && onError(detail?.message)) + window.addEventListener('feds:nav.error', ({ detail }) => onError && onError(detail?.message)); } window.loadNavigation = loadBlock;