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
9 changes: 9 additions & 0 deletions packages/block-editor/src/store/private-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ export const privateRemoveBlocks =
}

if ( rules[ 'bindings/core/pattern-overrides' ] ) {
const parentPatternBlocks =
select.getBlockParentsByBlockName(
clientId,
'core/block'
);
// We only need to run this check when editing the original pattern, not pattern instances.
if ( parentPatternBlocks?.length > 0 ) {
continue;
}
Comment on lines +143 to +151
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess another way is to only have the pattern overrides rule when within a pattern.

No real preference here, but I think it might affect the follow up that's underway.

const blockAttributes =
select.getBlockAttributes( clientId );
if (
Expand Down