Skip to content

Commit 2d63b48

Browse files
added fix for blocks undefined when inserting new design library entry
1 parent dc5bee1 commit 2d63b48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/block/design-library/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const createBlockWithAttributes = ( blockName, attributes, innerBlocks, design )
111111

112112
// Recursively update the attributes of all inner blocks for the new Color Picker
113113
const migrateToNewColorPicker = blocks => {
114-
blocks.forEach( block => {
114+
blocks?.forEach( block => {
115115
let newAttributes = block[ 1 ]
116116
newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes )
117117
newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes )

0 commit comments

Comments
 (0)