Skip to content

Commit

Permalink
Correctly pass on the config to the placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
mokimo committed Sep 17, 2024
1 parent bb2458f commit 7205d99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ async function checkForPageMods() {

async function loadPostLCP(config) {
const nodes = findReplaceableNodes(document.body.querySelector('header'));
if (nodes.length) await fetchPlaceholders(document.body.querySelector('header'), config);
if (nodes.length) await fetchPlaceholders(config);
if (nodes.length && decoratePlaceholderArea) {
await decoratePlaceholderArea({
placeholderRequest,
Expand Down Expand Up @@ -1250,7 +1250,7 @@ async function processSection(section, config, isDoc) {
const tasks = [];
const icons = section.el.querySelectorAll('span.icon');
if (icons.length > 0) tasks.push(fetchIcons(config));
if (findReplaceableNodes(section.el).length) tasks.push(fetchPlaceholders(section.el, config));
if (findReplaceableNodes(section.el).length) tasks.push(fetchPlaceholders(config));
if (section.preloadLinks.length) {
const [modals, nonModals] = partition(section.preloadLinks, (block) => block.classList.contains('modal'));
nonModals.forEach((block) => tasks.push(loadBlock(block)));
Expand Down

0 comments on commit 7205d99

Please sign in to comment.