Skip to content

Commit

Permalink
Remove condition that breaks monitoring resizes of post embeds
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Aug 17, 2024
1 parent 1dbd4a1 commit a4bab7e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions plugins/optimization-detective/detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.' );
}
Expand Down

0 comments on commit a4bab7e

Please sign in to comment.