Skip to content

Commit

Permalink
Cover: Improve disabled media buttons check for placeholder (#29858)
Browse files Browse the repository at this point in the history
See: #29813.
  • Loading branch information
Mamaduka committed Mar 15, 2021
1 parent eb8c769 commit a673abb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/block-library/src/cover/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ function mediaPosition( { x, y } ) {
}

function CoverPlaceholder( {
coverUrl,
hasBackground = false,
children,
noticeUI,
noticeOperations,
Expand All @@ -261,7 +261,7 @@ function CoverPlaceholder( {
accept="image/*,video/*"
allowedTypes={ ALLOWED_MEDIA_TYPES }
notices={ noticeUI }
disableMediaButtons={ !! coverUrl }
disableMediaButtons={ hasBackground }
onError={ ( message ) => {
removeAllNotices();
createErrorNotice( message );
Expand Down Expand Up @@ -646,7 +646,7 @@ function CoverEdit( {
) }
{ isBlogUrl && <Spinner /> }
<CoverPlaceholder
coverUrl={ url }
hasBackground={ hasBackground }
noticeUI={ noticeUI }
onSelectMedia={ onSelectMedia }
noticeOperations={ noticeOperations }
Expand Down

0 comments on commit a673abb

Please sign in to comment.