From a4bab7ea186943e18b9c61e344bb52daa635d36f Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Tue, 13 Aug 2024 18:03:40 -0700 Subject: [PATCH] Remove condition that breaks monitoring resizes of post embeds --- plugins/optimization-detective/detect.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/optimization-detective/detect.js b/plugins/optimization-detective/detect.js index edf59de516..317d940d59 100644 --- a/plugins/optimization-detective/detect.js +++ b/plugins/optimization-detective/detect.js @@ -221,10 +221,6 @@ export default async function detect( { * @param {HTMLDivElement} embedWrapper Embed wrapper DIV. */ function monitorEmbedWrapperForResizes( embedWrapper ) { - // If the embed lacks any scripting, then short-circuit since it can't possibly be doing any mutations. - if ( ! embedWrapper.querySelector( 'script, [onload]' ) ) { - return; - } if ( ! ( 'odXpath' in embedWrapper.dataset ) ) { throw new Error( 'Embed wrapper missing data-od-xpath attribute.' ); }