From b95ea5d022745b93e7eb450abfdd3ba01cadefcf Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Sat, 28 Oct 2023 20:25:27 +0900 Subject: [PATCH] Command Palette: Fix a crash when transform to a block without icon (#55676) --- .../block-editor/src/components/use-block-commands/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/use-block-commands/index.js b/packages/block-editor/src/components/use-block-commands/index.js index 6a1fc28a8cf4b..f4b966c8508a2 100644 --- a/packages/block-editor/src/components/use-block-commands/index.js +++ b/packages/block-editor/src/components/use-block-commands/index.js @@ -22,6 +22,7 @@ import { /** * Internal dependencies */ +import BlockIcon from '../block-icon'; import { store as blockEditorStore } from '../../store'; export const useTransformCommands = () => { @@ -100,7 +101,7 @@ export const useTransformCommands = () => { name: 'core/block-editor/transform-to-' + name.replace( '/', '-' ), // translators: %s: block title/name. label: sprintf( __( 'Transform to %s' ), title ), - icon: icon.src, + icon: , callback: ( { close } ) => { onBlockTransform( name ); close();