CYS: fix selected header/footer pattern (#49788)
* CYS: fix selected header/footer pattern * 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
7e54c5a589
commit
440442f0fd
|
@ -2,7 +2,6 @@
|
|||
* External dependencies
|
||||
*/
|
||||
import { BlockInstance } from '@wordpress/blocks';
|
||||
import { isEqual } from 'lodash';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
@ -24,12 +23,12 @@ export const findPatternByBlock = (
|
|||
''
|
||||
);
|
||||
}
|
||||
|
||||
return patterns.find( ( pattern ) => {
|
||||
const patternBlocks = pattern.blocks[ 0 ];
|
||||
if ( patternBlocks.innerBlocks.length !== block.innerBlocks.length ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isEqual( patternBlocks.attributes, blockAttributes );
|
||||
return (
|
||||
patternBlocks.attributes.className === block.attributes.className
|
||||
);
|
||||
} );
|
||||
};
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: fix
|
||||
|
||||
CYS: fix selected header/footer pattern
|
Loading…
Reference in New Issue