From 4d2e453e4cf4fce1d956a6e16965a7d38405c6af Mon Sep 17 00:00:00 2001 From: Derek Blank Date: Thu, 7 Dec 2023 14:00:05 +1000 Subject: [PATCH] Check if native blockType exists before assigning wrapperProps --- .../src/components/block-list/block.native.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/block-editor/src/components/block-list/block.native.js b/packages/block-editor/src/components/block-list/block.native.js index 03a84d530ba12..f800e2da19562 100644 --- a/packages/block-editor/src/components/block-list/block.native.js +++ b/packages/block-editor/src/components/block-list/block.native.js @@ -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( () => {