Skip to content

Commit

Permalink
Cover: Update background type when using featured image (#40873)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored and gziolo committed May 6, 2022
1 parent 93befd1 commit 9e782ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/block-library/src/cover/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,13 @@ function CoverEdit( {

const toggleUseFeaturedImage = () => {
setAttributes( {
id: undefined,
url: undefined,
useFeaturedImage: ! useFeaturedImage,
dimRatio: dimRatio === 100 ? 50 : dimRatio,
backgroundType: useFeaturedImage
? IMAGE_BACKGROUND_TYPE
: undefined,
} );
};

Expand Down

0 comments on commit 9e782ed

Please sign in to comment.