Skip to content

Commit

Permalink
Navigation: Fix warning when stretch justification is used (#50568)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong authored May 14, 2023
1 parent 8853016 commit 4af25a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,10 @@ function render_block_core_navigation( $attributes, $content, $block ) {

// Restore legacy classnames for submenu positioning.
$layout_class = '';
if ( isset( $attributes['layout']['justifyContent'] ) ) {
if (
isset( $attributes['layout']['justifyContent'] ) &&
isset( $layout_justification[ $attributes['layout']['justifyContent'] ] )
) {
$layout_class .= $layout_justification[ $attributes['layout']['justifyContent'] ];
}
if ( isset( $attributes['layout']['orientation'] ) && 'vertical' === $attributes['layout']['orientation'] ) {
Expand Down

0 comments on commit 4af25a1

Please sign in to comment.