From 2b3a6fcfb31be3b132bb73980f329f890d986e21 Mon Sep 17 00:00:00 2001 From: nani-samireddy Date: Wed, 23 Oct 2024 10:55:52 +0530 Subject: [PATCH] Update the chek with RichText.isEmpty --- packages/block-library/src/list-item/save.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/list-item/save.js b/packages/block-library/src/list-item/save.js index c38f6968ab418d..8bd11149dd457f 100644 --- a/packages/block-library/src/list-item/save.js +++ b/packages/block-library/src/list-item/save.js @@ -8,7 +8,7 @@ export default function save( { attributes } ) { * Render the list item only if there is content. * This check is to eliminate empty list items from the front end. */ - if ( attributes.content?.length === 0 ) { + if ( RichText.isEmpty( attributes.content ) ) { return null; }