CYS: fix Undefined array key queryId warning (#45399)

* CYS: fix Undefined array key queryId warning

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Luigi Teschio 2024-03-08 10:02:41 +01:00 committed by GitHub
parent a3811fa007
commit 913953f586
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -183,9 +183,11 @@ export const BlockEditor = ( {} ) => {
onChange={
// We need to pass onChange for the logo screen so that logo block can be updated when we change the logo attributes in logo sidebar navigation screen component.
// We also need to pass onChange for the assembler hub screen so when a block set an attribute during the block initialization, the block editor will be updated.
// We also need to pass onChange when the homepage pattern is updated because the Product Collection block sets a dynamic attribute and we need to update the block editor.
// For other screens, we don't need to pass onChange. Otherwise, we'll get a race condition issue where the block editor will be updated twice: once from the onChange in the sidebar component, and once from the onChange in the block editor component.
[
'/customize-store/assembler-hub/logo',
'/customize-store/assembler-hub/homepage',
'/customize-store/assembler-hub',
].includes( urlParams.path )
? onChange

View File

@ -0,0 +1,4 @@
Significance: minor
Type: fix
CYS: fix Undefined array key queryId warning