Skip to content

Commit

Permalink
Post title: fix single line past
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jul 11, 2022
1 parent 80444af commit 0a710b0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/editor/src/components/post-title/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,13 @@ function PostTitle( _, forwardedRef ) {
plainText,
} );

if ( typeof content !== 'string' && content.length ) {
event.preventDefault();

if ( ! content.length ) {
return;
}

if ( typeof content !== 'string' ) {
event.preventDefault();

const [ firstBlock ] = content;
Expand All @@ -164,6 +170,8 @@ function PostTitle( _, forwardedRef ) {
} else {
onInsertBlockAfter( content );
}
} else {
onUpdate( content );
}
}

Expand Down

0 comments on commit 0a710b0

Please sign in to comment.