From bf0cb6e016c3c3b538cceb305896a7ee57cca8b5 Mon Sep 17 00:00:00 2001 From: bosco-ensemble Date: Mon, 8 Apr 2024 18:40:08 -0700 Subject: [PATCH] TDW-2277 called load ads function in load lazy --- scripts/scripts.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/scripts.js b/scripts/scripts.js index 55e99d99..6eed0509 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -710,8 +710,6 @@ async function loadPage(doc) { // eslint-disable-next-line no-use-before-define await loadLazy(doc); // eslint-disable-next-line no-use-before-define - await loadAds(doc); - // eslint-disable-next-line no-use-before-define loadDelayed(doc); } @@ -1071,6 +1069,9 @@ async function loadLazy(doc) { addFavIcon(`${window.hlx.codeBasePath}/styles/favicon.ico`); doc.querySelectorAll('div:not([class]):not([id]):empty').forEach((empty) => empty.remove()); + + // eslint-disable-next-line no-use-before-define + await loadAds(doc); } /**