Skip to content

Commit

Permalink
Improve content length check
Browse files Browse the repository at this point in the history
`empty()` will return `true` if we pass the '0' string.
  • Loading branch information
tyxla committed May 30, 2023
1 parent e152ff9 commit beb0a00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/experimental/disable-tinymce.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function gutenberg_current_content_contains_classic_block() {

$parsed_blocks = parse_blocks( $content );
foreach ( $parsed_blocks as $block ) {
if ( empty( $block['blockName'] ) && ! empty( trim( $block['innerHTML'] ) ) ) {
if ( empty( $block['blockName'] ) && strlen( trim( $block['innerHTML'] ) ) > 0 ) {
return true;
}
}
Expand Down

0 comments on commit beb0a00

Please sign in to comment.