From 95b42ad751d311bf631d977d39aed76777de0e9d Mon Sep 17 00:00:00 2001 From: Carlos Bravo Date: Wed, 19 Jan 2022 14:13:15 +0100 Subject: [PATCH] Update comment information of having empty object --- packages/block-library/src/comment-template/edit.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/block-library/src/comment-template/edit.js b/packages/block-library/src/comment-template/edit.js index 5946be4a06869d..da48be1585f1a8 100644 --- a/packages/block-library/src/comment-template/edit.js +++ b/packages/block-library/src/comment-template/edit.js @@ -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: [ {} ],