diff --git a/packages/block-library/src/navigation/edit/navigation-menu-selector.js b/packages/block-library/src/navigation/edit/navigation-menu-selector.js index ca467b6d56071..50f67b8f2eb56 100644 --- a/packages/block-library/src/navigation/edit/navigation-menu-selector.js +++ b/packages/block-library/src/navigation/edit/navigation-menu-selector.js @@ -246,10 +246,9 @@ function NavigationMenuSelector( { if ( ! hasNavigationMenus && ! hasClassicMenus ) { if ( ! process.env.IS_GUTENBERG_PLUGIN ) { + // This has to be in it's own conditional so it is removed by dead code elimination. Previously used isOffCanvasNavigationEditorEnabled. return NavigationMenuSelectorButton; } - - return NavigationMenuSelectorButton; } return NavigationMenuSelectorDropdown;