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); } /**