diff --git a/packages/react-native-editor/src/index.js b/packages/react-native-editor/src/index.js index bb97e34af5f590..2d9cd3ed6c79ac 100644 --- a/packages/react-native-editor/src/index.js +++ b/packages/react-native-editor/src/index.js @@ -18,7 +18,7 @@ import { validateThemeColors, validateThemeGradients, } from '@wordpress/block-editor'; -import { unregisterBlockType } from '@wordpress/blocks'; +import { unregisterBlockType, getBlockType } from '@wordpress/blocks'; const reactNativeSetup = () => { // Disable warnings as they disrupt the user experience in dev mode @@ -58,7 +58,10 @@ const setupInitHooks = () => { setupLocale( props.locale, props.translations ); const capabilities = props.capabilities ?? {}; - if ( capabilities.reusableBlock !== true ) { + if ( + getBlockType( 'core/block' ) !== undefined && + capabilities.reusableBlock !== true + ) { unregisterBlockType( 'core/block' ); } }