Skip to content

Commit

Permalink
Fix: Removed shuffle button when only 1 pattern is present (#63093)
Browse files Browse the repository at this point in the history
Removed shuffle button when only 1 pattern is present of the same category

----

Unlinked contributors: laurelfulford.

Co-authored-by: Sourav61 <[email protected]>
Co-authored-by: talldan <[email protected]>
  • Loading branch information
3 people authored and ellatrix committed Jul 18, 2024
1 parent df5fab0 commit 07d5d60
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ export default function Shuffle( { clientId, as = Container } ) {
);
} );
}, [ categories, patterns ] );
if ( sameCategoryPatternsWithSingleWrapper.length === 0 ) {

if ( sameCategoryPatternsWithSingleWrapper.length < 2 ) {
return null;
}

Expand Down

0 comments on commit 07d5d60

Please sign in to comment.