Skip to content

Commit a85bf61

Browse files
adithya-naikadithya-naikMamadukakraftner
authored andcommitted
fix: add optional chaining for empty reusable block (#81165) (#81177)
Co-authored-by: adithya-naik <adithyanaik@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: kraftner <kraftner@git.wordpress.org>
1 parent 508c581 commit a85bf61

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/block-library/src/block

‎packages/block-library/src/block/edit.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ function ReusableBlockEdit( {
191191
const canOverrideBlocks = useMemo( () => {
192192
const supportedBlockTypes = Object.keys( supportedBlockTypesRaw );
193193
const hasOverridableBlocks = ( _blocks ) =>
194-
_blocks.some( ( block ) => {
194+
_blocks?.some( ( block ) => {
195195
if (
196196
supportedBlockTypes.includes( block.name ) &&
197197
isOverridableBlock( block )

0 commit comments

Comments
 (0)