Skip to content

Commit

Permalink
Check for string types in background image so it will apply defaults …
Browse files Browse the repository at this point in the history
…for blocks.

Update comments
  • Loading branch information
ramonjd committed Aug 2, 2024
1 parent b11af7e commit 0cda47f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function setBackgroundStyleDefaults( backgroundStyle ) {
let backgroundStylesWithDefaults;

// Set block background defaults.
if ( !! backgroundImage?.url ) {
if ( !! backgroundImage?.url || typeof backgroundImage === 'string' ) {
if ( ! backgroundStyle?.backgroundSize ) {
backgroundStylesWithDefaults = {
backgroundSize: 'cover',
Expand Down

0 comments on commit 0cda47f

Please sign in to comment.