Skip to content

Commit

Permalink
return nothing if empty content (#30554)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras authored Apr 7, 2021
1 parent 3a7ef4c commit 88745a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/block-library/src/query-pagination-numbers/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ function render_block_core_query_pagination_numbers( $attributes, $content, $blo
wp_reset_postdata(); // Restore original Post Data.
$wp_query = $prev_wp_query;
}
if ( empty( $content ) ) {
return '';
}
return sprintf(
'<div %1$s>%2$s</div>',
$wrapper_attributes,
Expand Down

0 comments on commit 88745a9

Please sign in to comment.