Skip to content

Commit

Permalink
Modify label for connected paragraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
artemiomorales committed Sep 6, 2024
1 parent 9523fb4 commit e02a367
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/block-library/src/paragraph/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ export const settings = {
return customName;
}

const { content } = attributes;
const { content, metadata: currentMetadata } = attributes;

if ( currentMetadata?.bindings?.content ) {
return __( 'Paragraph with dynamic content' );
}
return ! content || content.length === 0 ? __( 'Empty' ) : content;
}
},
Expand Down

0 comments on commit e02a367

Please sign in to comment.