diff --git a/packages/block-editor/src/components/inserter/block-list.js b/packages/block-editor/src/components/inserter/block-list.js index b91809c23df3cb..0df90053a62955 100644 --- a/packages/block-editor/src/components/inserter/block-list.js +++ b/packages/block-editor/src/components/inserter/block-list.js @@ -109,9 +109,11 @@ function InserterBlockList( { }, [ filterValue, items, categories, collections ] ); const childItems = useMemo( () => { - return filter( filteredItems, ( { name } ) => - rootChildBlocks?.includes( name ) - ); + return rootChildBlocks + ? filter( filteredItems, ( { name } ) => + rootChildBlocks.includes( name ) + ) + : []; }, [ filteredItems, rootChildBlocks ] ); const suggestedItems = useMemo( () => {