diff --git a/packages/block-library/src/more/block.json b/packages/block-library/src/more/block.json index b071f6ba5d7ef..d1153ca4f1689 100644 --- a/packages/block-library/src/more/block.json +++ b/packages/block-library/src/more/block.json @@ -9,7 +9,8 @@ "textdomain": "default", "attributes": { "customText": { - "type": "string" + "type": "string", + "default": "" }, "noTeaser": { "type": "boolean", diff --git a/packages/block-library/src/more/edit.js b/packages/block-library/src/more/edit.js index 6b5dc59a13554..bcad7ec1b8366 100644 --- a/packages/block-library/src/more/edit.js +++ b/packages/block-library/src/more/edit.js @@ -10,14 +10,13 @@ import { getDefaultBlockName, createBlock } from '@wordpress/blocks'; const DEFAULT_TEXT = __( 'Read more' ); export default function MoreEdit( { - attributes: { customText = '', noTeaser }, + attributes: { customText, noTeaser }, insertBlocksAfter, setAttributes, } ) { const onChangeInput = ( event ) => { setAttributes( { - customText: - event.target.value !== '' ? event.target.value : undefined, + customText: event.target.value, } ); };