From ad50e4b21bb0b54e7a1892ee1ba7619647317600 Mon Sep 17 00:00:00 2001 From: Vivian A Goodrich <101133187+vgoodric@users.noreply.github.com> Date: Mon, 2 Sep 2024 02:17:57 -0600 Subject: [PATCH] MWPW-157034 [MEP] move call for preview from loadPostLCP to loadDeferred (#2770) * move call for preview from loadPostLCP to loadDeferred * change function name to getSelectorType * revert --- libs/utils/utils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/utils/utils.js b/libs/utils/utils.js index 52d3b0e190..6931da2a23 100644 --- a/libs/utils/utils.js +++ b/libs/utils/utils.js @@ -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) { @@ -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() {