Skip to content

Commit

Permalink
Fix empty summary fallback text
Browse files Browse the repository at this point in the history
  • Loading branch information
Sukhendu2002 committed Jan 14, 2025
1 parent 130b6e2 commit fbe7e7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/block-library/src/details/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
* WordPress dependencies
*/
import { RichText, useBlockProps, InnerBlocks } from '@wordpress/block-editor';
import { __ } from '@wordpress/i18n';

export default function save( { attributes } ) {
const { showContent } = attributes;
const summary = attributes.summary ? attributes.summary : 'Details';
const summary = attributes.summary?.toString().trim()
? attributes.summary
: __( 'Details' );
const blockProps = useBlockProps.save();

return (
Expand Down

0 comments on commit fbe7e7b

Please sign in to comment.