Skip to content

Commit

Permalink
Add the block name to the pattern content data
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Feb 6, 2024
1 parent 28b78b5 commit f29d615
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/block-library/src/block/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ function getContentValuesFromInnerBlocks( blocks, defaultValues ) {
block.attributes[ attributeKey ] !==
defaultValues[ blockId ][ attributeKey ]
) {
content[ blockId ] ??= { values: {} };
content[ blockId ] ??= { values: {}, blockName: block.name };
// TODO: We need a way to represent `undefined` in the serialized overrides.
// Also see: https://github.com/WordPress/gutenberg/pull/57249#discussion_r1452987871
content[ blockId ].values[ attributeKey ] =
block.attributes[ attributeKey ] === undefined
? // TODO: We use an empty string to represent undefined for now until
Expand Down

0 comments on commit f29d615

Please sign in to comment.