Skip to content

Commit

Permalink
Update comment information of having empty object
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Bravo committed Jan 24, 2022
1 parent 0f7bc30 commit 95b42ad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/block-library/src/comment-template/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ export default function CommentTemplateEdit( {

const { rawComments, blocks } = useSelect(
( select ) => {
// Show empty comments if we don't have a postId context.
// The structure of the empty object as a rawComment allows
// to inner blocks to render the default placeholders.
if ( ! postId ) {
return {
rawComments: [ {} ],
Expand Down

0 comments on commit 95b42ad

Please sign in to comment.