diff --git a/packages/block-editor/src/hooks/style.js b/packages/block-editor/src/hooks/style.js index 11946ff53a6de..138867e9c462c 100644 --- a/packages/block-editor/src/hooks/style.js +++ b/packages/block-editor/src/hooks/style.js @@ -11,6 +11,7 @@ import { addFilter } from '@wordpress/hooks'; import { getBlockSupport, hasBlockSupport, + getBlockType, __EXPERIMENTAL_ELEMENTS as ELEMENTS, } from '@wordpress/blocks'; import { createHigherOrderComponent, useInstanceId } from '@wordpress/compose'; @@ -347,6 +348,11 @@ export function addEditProps( settings ) { */ export const withBlockControls = createHigherOrderComponent( ( BlockEdit ) => ( props ) => { + const blockType = getBlockType( props.name ); + if ( ! hasStyleSupport( blockType ) ) { + return ; + } + const shouldDisplayControls = useDisplayBlockControls(); const blockEditingMode = useBlockEditingMode();