Skip to content

Commit

Permalink
Merge pull request #375 from Automattic/master
Browse files Browse the repository at this point in the history
Release – Nov. 17
  • Loading branch information
dkoo authored Nov 17, 2020
2 parents 693e1a3 + 143fe4c commit 9056dbb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/newsletter-editor/styling/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ export const ApplyStyling = withSelect( customStylesSelector )(
document.documentElement.style.setProperty( '--header-font', fontHeader );
}, [ fontHeader ]);
useEffect(() => {
document.querySelector( '.edit-post-visual-editor' ).style.backgroundColor = backgroundColor;
const editorElement = document.querySelector( '.edit-post-visual-editor' );
if ( editorElement ) {
editorElement.style.backgroundColor = backgroundColor;
}
}, [ backgroundColor ]);

return null;
Expand Down

0 comments on commit 9056dbb

Please sign in to comment.