mirror of
https://github.com/woocommerce/woocommerce.git
synced 2025-09-04 11:06:25 +08:00
CYS: fix php warning raise by the Product Collection block (#43546)
* CYS: fix php warning raise by the Product Collection block * fix typo * 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:
parent
aa661f2234
commit
5edea79b41
2 changed files with 10 additions and 2 deletions
|
@ -155,9 +155,13 @@ export const BlockEditor = ( {} ) => {
|
||||||
<BlockPreview
|
<BlockPreview
|
||||||
blocks={ renderedBlocks }
|
blocks={ renderedBlocks }
|
||||||
onChange={
|
onChange={
|
||||||
// We only 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 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.
|
||||||
// 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.
|
// 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.
|
||||||
urlParams.path === '/customize-store/assembler-hub/logo'
|
[
|
||||||
|
'/customize-store/assembler-hub/logo',
|
||||||
|
'/customize-store/assembler-hub',
|
||||||
|
].includes( urlParams.path )
|
||||||
? onChange
|
? onChange
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
CYS: fix php warning raise by the Product Collection block.
|
Loading…
Add table
Add a link
Reference in a new issue