Skip to content

Commit

Permalink
Check if native blockType exists before assigning wrapperProps
Browse files Browse the repository at this point in the history
  • Loading branch information
derekblank committed Dec 7, 2023
1 parent 550966a commit 4d2e453
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/block-editor/src/components/block-list/block.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,13 @@ function BlockListBlock( {
);

// Block level styles.
const wrapperProps = getWrapperProps(
attributes,
blockType.getEditWrapperProps
);
let wrapperProps = {};
if ( blockType?.getEditWrapperProps ) {
wrapperProps = getWrapperProps(
attributes,
blockType.getEditWrapperProps
);
}

// Inherited styles merged with block level styles.
const mergedStyle = useMemo( () => {
Expand Down

0 comments on commit 4d2e453

Please sign in to comment.