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 committed May 6, 2022
1 parent e1bb280 commit 24af10d
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 @@ -343,8 +343,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 24af10d

Please sign in to comment.