From e1a7b61a65193b4a00cccfecc2f7ead464dd5dc2 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 16 Jul 2024 07:33:40 +0400 Subject: [PATCH] Use static 'key' when filtering BlockEdit components --- 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 7677a5e1726cfe..4562afb3817c64 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 60f56e7e9072e9..a4aa81e88393ad 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 c39315505232e7..61a8b4cd7187f2 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 && ( ) }