Skip to content

Commit

Permalink
Update the chek with RichText.isEmpty
Browse files Browse the repository at this point in the history
  • Loading branch information
nani-samireddy committed Oct 23, 2024
1 parent 3b5ea15 commit 2b3a6fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/list-item/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2b3a6fc

Please sign in to comment.