Skip to content

Commit

Permalink
Revert "Fix warning when a template calls a template area twice (#54861
Browse files Browse the repository at this point in the history
…)" (#54926)

This reverts commit f637b37.
  • Loading branch information
scruffian authored Sep 29, 2023
1 parent ad530e9 commit b7dc65c
Showing 1 changed file with 1 addition and 6 deletions.
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

1 comment on commit b7dc65c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in b7dc65c.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6350554056
📝 Reported issues:

Please sign in to comment.