Skip to content

Commit

Permalink
MWPW-157034 [MEP] move call for preview from loadPostLCP to loadDefer…
Browse files Browse the repository at this point in the history
…red (#2770)

* move call for preview from loadPostLCP to loadDeferred

* change function name to getSelectorType

* revert
  • Loading branch information
vgoodric committed Sep 2, 2024
1 parent 10cfc4b commit ad50e4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1013,10 +1013,6 @@ async function loadPostLCP(config) {
import('../features/personalization/personalization.js')
.then(({ addMepAnalytics }) => addMepAnalytics(config, header));
}
if (config.mep?.preview) {
import('../features/personalization/preview.js')
.then(({ default: decoratePreviewMode }) => decoratePreviewMode());
}
}

export function scrollToHashedElement(hash) {
Expand Down Expand Up @@ -1072,6 +1068,10 @@ export async function loadDeferred(area, blocks, config) {
sampleRate: parseInt(getMetadata('pageperf-rate'), 10),
}));
}
if (config.mep?.preview) {
import('../features/personalization/preview.js')
.then(({ default: decoratePreviewMode }) => decoratePreviewMode());
}
}

function initSidekick() {
Expand Down

0 comments on commit ad50e4b

Please sign in to comment.