Skip to content

Commit ea710ca

Browse files
committed
Fix 'Convert to Regular Block' button
Fix 'Convert to Shared Block' showing on shared blocks by having the convert button always treat 'core/block' blocks as non-static.
1 parent 7ed7b47 commit ea710ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

editor/components/block-settings-menu/shared-block-convert-button.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function SharedBlockConvertButton( {
5252

5353
export default compose( [
5454
withSelect( ( select, { uid } ) => {
55-
const { getBlock, getSharedBlock } = select( 'core/editor' );
55+
const { getBlock } = select( 'core/editor' );
5656
const { getFallbackBlockName } = select( 'core/blocks' );
5757

5858
const block = getBlock( uid );
@@ -64,7 +64,7 @@ export default compose( [
6464
// Hide 'Convert to Shared Block' on Classic blocks. Showing it causes a
6565
// confusing UX, because of its similarity to the 'Convert to Blocks' button.
6666
isVisible: block.name !== getFallbackBlockName(),
67-
isStaticBlock: ! isSharedBlock( block ) || ! getSharedBlock( block.attributes.ref ),
67+
isStaticBlock: ! isSharedBlock( block ),
6868
};
6969
} ),
7070
withDispatch( ( dispatch, { uid, onToggle = noop } ) => {

0 commit comments

Comments
 (0)