From cd69af92f04e124adeaa67aa715e184b32090837 Mon Sep 17 00:00:00 2001 From: Jorge Costa Date: Wed, 19 Jun 2024 14:41:22 +0200 Subject: [PATCH] Fix: Don't allow synced patterns to be inserted on shuffling. (#62422) Co-authored-by: jorgefilipecosta Co-authored-by: talldan Co-authored-by: richtabor Co-authored-by: ndiego --- packages/block-editor/src/components/block-toolbar/shuffle.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-toolbar/shuffle.js b/packages/block-editor/src/components/block-toolbar/shuffle.js index 8f8bc0c58e65c..e7e40619f6a49 100644 --- a/packages/block-editor/src/components/block-toolbar/shuffle.js +++ b/packages/block-editor/src/components/block-toolbar/shuffle.js @@ -60,7 +60,9 @@ export default function Shuffle( { clientId, as = Container } ) { pattern.blocks.length === 1 && pattern.categories?.some( ( category ) => { return categories.includes( category ); - } ) + } ) && + // Check if the pattern is not a synced pattern. + ( pattern.syncStatus === 'unsynced' || ! pattern.id ) ); } ); }, [ categories, patterns ] );