Skip to content

Commit

Permalink
Pattern Shuffling: Don't assume that patterns have categories (#60070)
Browse files Browse the repository at this point in the history
Co-authored-by: scruffian <[email protected]>
Co-authored-by: arthur791004 <[email protected]>
  • Loading branch information
3 people authored Mar 21, 2024
1 parent e04cf9c commit c657927
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function Shuffle( { clientId, as = Container } ) {
// Check if the pattern has only one top level block,
// otherwise we may shuffle to pattern that will not allow to continue shuffling.
pattern.blocks.length === 1 &&
pattern.categories.some( ( category ) => {
pattern.categories?.some( ( category ) => {
return categories.includes( category );
} )
);
Expand Down

1 comment on commit c657927

@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 c657927.
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/8375643846
📝 Reported issues:

Please sign in to comment.