Skip to content

Commit

Permalink
Prevent transform to Group block when featured image is set. (#42638)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndiego authored Jul 25, 2022
1 parent 0e9b766 commit 7fd28e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/cover/transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ const transforms = {
{
type: 'block',
blocks: [ 'core/group' ],
isMatch: ( { url } ) => {
isMatch: ( { url, useFeaturedImage } ) => {
// If the Cover block uses background media, skip this transform,
// and instead use the Group block's default transform.
if ( url ) {
if ( url || useFeaturedImage ) {
return false;
}
return true;
Expand Down

0 comments on commit 7fd28e4

Please sign in to comment.