Skip to content

Commit

Permalink
fix #51723 (#53092)
Browse files Browse the repository at this point in the history
  • Loading branch information
shimotmk committed Jul 31, 2023
1 parent 736feac commit 1052456
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/block-editor/src/hooks/style.js
Expand Up @@ -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';
Expand Down Expand Up @@ -347,6 +348,11 @@ export function addEditProps( settings ) {
*/
export const withBlockControls = createHigherOrderComponent(
( BlockEdit ) => ( props ) => {
const blockType = getBlockType( props.name );
if ( ! hasStyleSupport( blockType ) ) {
return <BlockEdit { ...props } />;
}

const shouldDisplayControls = useDisplayBlockControls();
const blockEditingMode = useBlockEditingMode();

Expand Down

0 comments on commit 1052456

Please sign in to comment.