Skip to content

Commit

Permalink
TDW-2277 called loadDependencies in loadPAge
Browse files Browse the repository at this point in the history
  • Loading branch information
bosco-ensemble committed Apr 9, 2024
1 parent 0275ccb commit 65c210f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,8 @@ async function loadPage(doc) {
await loadEager(doc);
// eslint-disable-next-line no-use-before-define
await loadLazy(doc);
// eslint-disable-next-line import/no-cycle
loadDependencies();
// eslint-disable-next-line no-use-before-define
loadDelayed(doc);
}
Expand Down Expand Up @@ -1069,8 +1071,6 @@ 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 import/no-cycle
loadDependencies();
}

/**
Expand All @@ -1085,7 +1085,7 @@ function loadDelayed() {

function loadDependencies() {
// eslint-disable-next-line import/no-cycle
window.setTimeout(() => import('./dependencies.js'), 1000);
window.setTimeout(() => import('./dependencies.js'), 500);
}

export async function lookupPages(pathnames) {
Expand Down

0 comments on commit 65c210f

Please sign in to comment.