From e64a6660ecb92cda6b157b7ac54df83e967bb45d Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 16 Jul 2024 13:43:08 +0400 Subject: [PATCH] Use static 'key' when filtering BlockEdit components (#63590) Co-authored-by: Mamaduka Co-authored-by: tyxla --- packages/customize-widgets/src/filters/move-to-sidebar.js | 2 +- packages/customize-widgets/src/filters/wide-widget-display.js | 2 +- .../edit-site/src/hooks/push-changes-to-global-styles/index.js | 2 +- packages/edit-widgets/src/filters/move-to-widget-area.js | 2 +- packages/editor/src/hooks/pattern-overrides.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/customize-widgets/src/filters/move-to-sidebar.js b/packages/customize-widgets/src/filters/move-to-sidebar.js index 7677a5e1726cf..4562afb3817c6 100644 --- a/packages/customize-widgets/src/filters/move-to-sidebar.js +++ b/packages/customize-widgets/src/filters/move-to-sidebar.js @@ -83,7 +83,7 @@ const withMoveToSidebarToolbarItem = createHigherOrderComponent( return ( <> - + { hasMultipleSidebars && canInsertBlockInSidebar && ( widget.id_base === idBase )?.is_wide ?? false; - return ; + return ; }, 'withWideWidgetDisplay' ); diff --git a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js index 60f56e7e9072e..a4aa81e88393a 100644 --- a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js +++ b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js @@ -375,7 +375,7 @@ function PushChangesToGlobalStyles( props ) { const withPushChangesToGlobalStyles = createHigherOrderComponent( ( BlockEdit ) => ( props ) => ( <> - + { props.isSelected && } ) diff --git a/packages/edit-widgets/src/filters/move-to-widget-area.js b/packages/edit-widgets/src/filters/move-to-widget-area.js index c39315505232e..61a8b4cd7187f 100644 --- a/packages/edit-widgets/src/filters/move-to-widget-area.js +++ b/packages/edit-widgets/src/filters/move-to-widget-area.js @@ -48,7 +48,7 @@ const withMoveToWidgetAreaToolbarItem = createHigherOrderComponent( return ( <> - + { isMoveToWidgetAreaVisible && ( - + { props.isSelected && isSupportedBlock && ( ) }