Skip to content

Commit 5efe190

Browse files
committed
fix: correctly check for trimmed value in wp_get_layout_style()
1 parent f0c3eee commit 5efe190

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/wp-includes/block-supports/layout.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
439439
}
440440
$gap_value = trim( $combined_gap_value );
441441

442-
if ( null !== $gap_value && ! $should_skip_gap_serialization ) {
442+
if ( '' !== $gap_value && ! $should_skip_gap_serialization ) {
443443
$layout_styles[] = array(
444444
'selector' => $selector,
445445
'declarations' => array( 'gap' => $gap_value ),
@@ -526,7 +526,7 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
526526
}
527527
$gap_value = trim( $combined_gap_value );
528528

529-
if ( null !== $gap_value && ! $should_skip_gap_serialization ) {
529+
if ( '' !== $gap_value && ! $should_skip_gap_serialization ) {
530530
$layout_styles[] = array(
531531
'selector' => $selector,
532532
'declarations' => array( 'gap' => $gap_value ),

0 commit comments

Comments
 (0)