Skip to content

Commit 0e91129

Browse files
Don't use getBlockAttributes inside getValue
1 parent aa0ad3e commit 0e91129

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/editor/src/bindings/pattern-overrides.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ export default {
1010
name: 'core/pattern-overrides',
1111
label: _x( 'Pattern Overrides', 'block bindings source' ),
1212
getValue( { select, clientId, attributeName } ) {
13-
const { getBlockAttributes, getBlockParentsByBlockName } =
13+
const { getBlock, getBlockParentsByBlockName } =
1414
select( blockEditorStore );
15-
const currentBlockAttributes = getBlockAttributes( clientId );
15+
const { attributes: currentBlockAttributes } = getBlock( clientId );
1616
const [ patternClientId ] = getBlockParentsByBlockName(
1717
clientId,
1818
'core/block',
1919
true
2020
);
2121

2222
const overridableValue =
23-
getBlockAttributes( patternClientId )?.[ CONTENT ]?.[
23+
getBlock( patternClientId )?.attributes?.[ CONTENT ]?.[
2424
currentBlockAttributes?.metadata?.name
2525
]?.[ attributeName ];
2626

0 commit comments

Comments
 (0)