Skip to content

Commit

Permalink
Revert "Fix Post Featured Image placeholder regression (#31709)"
Browse files Browse the repository at this point in the history
This reverts commit 6abd194.
  • Loading branch information
ellatrix committed May 14, 2021
1 parent f21f09d commit 54462de
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/block-library/src/post-featured-image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,10 @@ function PostFeaturedImageDisplay( {

const PostFeaturedImageWithNotices = withNotices( PostFeaturedImageDisplay );

const OutofContextPlaceholder = () => {
const blockProps = useBlockProps();
return <div { ...blockProps }>{ placeholderChip }</div>;
};

export default function PostFeaturedImageEdit( props ) {
const blockProps = useBlockProps();
if ( ! props.context?.postId ) {
return <OutofContextPlaceholder />;
return <div { ...blockProps }>{ placeholderChip }</div>;
}
return <PostFeaturedImageWithNotices { ...props } />;
}

0 comments on commit 54462de

Please sign in to comment.