From a673abb2f3a832b6143ae82805e2b5c980ec734a Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Mon, 15 Mar 2021 14:03:27 +0400 Subject: [PATCH] Cover: Improve disabled media buttons check for placeholder (#29858) See: #29813. --- packages/block-library/src/cover/edit.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/cover/edit.js b/packages/block-library/src/cover/edit.js index d8e59ec8a5ef30..ec167b51ce3019 100644 --- a/packages/block-library/src/cover/edit.js +++ b/packages/block-library/src/cover/edit.js @@ -241,7 +241,7 @@ function mediaPosition( { x, y } ) { } function CoverPlaceholder( { - coverUrl, + hasBackground = false, children, noticeUI, noticeOperations, @@ -261,7 +261,7 @@ function CoverPlaceholder( { accept="image/*,video/*" allowedTypes={ ALLOWED_MEDIA_TYPES } notices={ noticeUI } - disableMediaButtons={ !! coverUrl } + disableMediaButtons={ hasBackground } onError={ ( message ) => { removeAllNotices(); createErrorNotice( message ); @@ -646,7 +646,7 @@ function CoverEdit( { ) } { isBlogUrl && }