From 096c883495ab41876b8d2c8252e88575e8900e32 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Tue, 24 Sep 2024 03:00:16 +0200 Subject: [PATCH] Global styles: do not navigate twice to home screen when opening the sidebar (#65523) * Global styles: do not navigate twice to home screen on sidebar load * Remove whole default block Co-authored-by: ciampo Co-authored-by: ramonjd Co-authored-by: andrewserong --- .../edit-site/src/components/global-styles/ui.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/ui.js b/packages/edit-site/src/components/global-styles/ui.js index 60d7e314d7776a..bc6906a769af48 100644 --- a/packages/edit-site/src/components/global-styles/ui.js +++ b/packages/edit-site/src/components/global-styles/ui.js @@ -272,19 +272,6 @@ function GlobalStylesEditorCanvasContainerLink() { goTo( '/' ); } break; - default: - /* - * Example: the user has navigated to "Browse styles" or elsewhere - * and changes the editorCanvasContainerView, e.g., closes the style book. - * The panel should not be affected. - * Exclude revisions panel from this behavior, - * as it should close when the editorCanvasContainerView doesn't correspond. - */ - if ( path !== '/' && ! isRevisionsOpen ) { - return; - } - goTo( '/' ); - break; } }, [ editorCanvasContainerView, isRevisionsOpen, goTo ] ); }