Skip to content

Commit

Permalink
Use getHookedBlockNames in buildBlockTypeItem
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Feb 2, 2024
1 parent f627609 commit bf92975
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
getBlockType,
getBlockTypes,
getBlockVariations,
getHookedBlockNames,
hasBlockSupport,
getPossibleBlockTransformations,
parse,
Expand Down Expand Up @@ -1939,9 +1940,7 @@ const buildBlockTypeItem =

let initialAttributes = {};

const hookedBlocksForCurrentBlock = getBlockTypes()?.filter(
( { blockHooks } ) => blockHooks && id in blockHooks
);
const hookedBlocksForCurrentBlock = getHookedBlockNames( id );

if ( hookedBlocksForCurrentBlock?.length ) {
initialAttributes = {
Expand Down

0 comments on commit bf92975

Please sign in to comment.