Skip to content

Commit

Permalink
Fix: Don't allow synced patterns to be inserted on shuffling. (#62422)
Browse files Browse the repository at this point in the history
Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: richtabor <richtabor@git.wordpress.org>
Co-authored-by: ndiego <ndiego@git.wordpress.org>
  • Loading branch information
5 people authored Jun 19, 2024
1 parent 295ccb8 commit cd69af9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] );
Expand Down

0 comments on commit cd69af9

Please sign in to comment.