Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions packages/edit-site/src/store/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,8 @@ function getFilteredTemplatePartBlocks( blocks = EMPTY_ARRAY, templateParts ) {
const templatePartId = `${ theme }//${ slug }`;
const templatePart = templatePartsById[ templatePartId ];

// Make sure we don't duplicate template parts.
const existingTemplatePart = result.find(
( oneResult ) => oneResult.templatePart.id === templatePartId
);

// Only add to output if the found template part block is in the list of available template parts.
if ( templatePart && ! existingTemplatePart ) {
if ( templatePart ) {
result.push( {
templatePart,
block,
Expand Down