diff --git a/packages/edit-site/src/components/template-part-converter/convert-to-regular.js b/packages/edit-site/src/components/template-part-converter/convert-to-regular.js index 6407f8a22b0717..d64cbc90737e24 100644 --- a/packages/edit-site/src/components/template-part-converter/convert-to-regular.js +++ b/packages/edit-site/src/components/template-part-converter/convert-to-regular.js @@ -13,6 +13,15 @@ export default function ConvertToRegularBlocks( { clientId } ) { const { getBlocks } = useSelect( blockEditorStore ); const { replaceBlocks } = useDispatch( blockEditorStore ); + const canRemove = useSelect( + ( select ) => select( blockEditorStore ).canRemoveBlock( clientId ), + [ clientId ] + ); + + if ( ! canRemove ) { + return null; + } + return ( { ( { onClose } ) => (