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 14, 2024
1 parent 7a4d64a commit f8971e9
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 f8971e9

Please sign in to comment.