diff --git a/packages/block-library/src/navigation/edit/index.js b/packages/block-library/src/navigation/edit/index.js
index b95ad49d2d9b6..751d33b9b501f 100644
--- a/packages/block-library/src/navigation/edit/index.js
+++ b/packages/block-library/src/navigation/edit/index.js
@@ -92,7 +92,7 @@ function Navigation( {
flexWrap = 'wrap',
} = {},
hasIcon,
- icon,
+ icon = 'handle',
} = attributes;
const ref = attributes.ref;
diff --git a/packages/block-library/src/navigation/edit/overlay-menu-icon.js b/packages/block-library/src/navigation/edit/overlay-menu-icon.js
index 655094532840e..4db5f2d9faa09 100644
--- a/packages/block-library/src/navigation/edit/overlay-menu-icon.js
+++ b/packages/block-library/src/navigation/edit/overlay-menu-icon.js
@@ -5,21 +5,7 @@ import { SVG, Rect } from '@wordpress/primitives';
import { Icon, menu, moreVertical, moreHorizontal } from '@wordpress/icons';
export default function OverlayMenuIcon( { icon } ) {
- if ( icon === 'handle' ) {
- return (
-
- );
- } else if ( icon === 'menu' ) {
+ if ( icon === 'menu' ) {
return ;
} else if ( icon === 'more-vertical' ) {
return ;
@@ -27,5 +13,17 @@ export default function OverlayMenuIcon( { icon } ) {
return ;
}
- return null;
+ return (
+
+ );
}
diff --git a/packages/block-library/src/navigation/index.php b/packages/block-library/src/navigation/index.php
index cb33dd4ba3bb4..f7f3f299cd875 100644
--- a/packages/block-library/src/navigation/index.php
+++ b/packages/block-library/src/navigation/index.php
@@ -611,12 +611,14 @@ function render_block_core_navigation( $attributes, $content, $block ) {
$should_display_icon_label = isset( $attributes['hasIcon'] ) && true === $attributes['hasIcon'];
$toggle_button_icon = '';
- if ( 'menu' === $attributes['icon'] ) {
- $toggle_button_icon = '';
- } elseif ( 'more-vertical' === $attributes['icon'] ) {
- $toggle_button_icon = '';
- } elseif ( 'more-horizontal' === $attributes['icon'] ) {
- $toggle_button_icon = '';
+ if ( isset( $attributes['icon'] ) ) {
+ if ( 'menu' === $attributes['icon'] ) {
+ $toggle_button_icon = '';
+ } elseif ( 'more-vertical' === $attributes['icon'] ) {
+ $toggle_button_icon = '';
+ } elseif ( 'more-horizontal' === $attributes['icon'] ) {
+ $toggle_button_icon = '';
+ }
}
$toggle_button_content = $should_display_icon_label ? $toggle_button_icon : __( 'Menu' );
$toggle_close_button_icon = '';