Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix/site-editor-podcast-player-b…
Browse files Browse the repository at this point in the history
…lock' into fix/site-editor-podcast-player-block
  • Loading branch information
ramonjd committed Apr 21, 2021
2 parents f4e98cf + 375efe9 commit 908e318
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ export function __maybeInjectStylesIntoSiteEditor() {
const mediaElementCSS = document.querySelector( 'link#mediaelement-css' );
const wpMediaElementCSS = document.querySelector( 'link#wp-mediaelement-css' );

if ( ! iframe.contentDocument.querySelector( 'link#mediaelement-css' ) ) {
if ( mediaElementCSS && ! iframe.contentDocument.querySelector( 'link#mediaelement-css' ) ) {
iframe.contentDocument.head.appendChild( mediaElementCSS.cloneNode() );
mediaElementCSS.remove();
}

if ( ! iframe.contentDocument.querySelector( 'link#wp-mediaelement-css' ) ) {
if ( wpMediaElementCSS && ! iframe.contentDocument.querySelector( 'link#wp-mediaelement-css' ) ) {
iframe.contentDocument.head.appendChild( wpMediaElementCSS.cloneNode() );
wpMediaElementCSS.remove();
}
Expand Down

0 comments on commit 908e318

Please sign in to comment.