Skip to content

Commit

Permalink
Global Styles: Restore the default variation to the color and typogra…
Browse files Browse the repository at this point in the history
…phy style tiles (#61901)

* Global Styles: Restore the default variation to the color and typography style tiles

* find the default variation with i18n

Co-authored-by: scruffian <[email protected]>
Co-authored-by: youknowriad <[email protected]>
  • Loading branch information
3 people authored May 23, 2024
1 parent 19508f9 commit fa98c1b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,12 @@ export default function useThemeStyleVariationsByProperty( {
cloneDeep( variation ),
property
);

// Remove variations that are empty once the property is filtered out.
if ( Object.keys( variationFilteredByProperty ).length === 0 ) {
if (
variation.title !== __( 'Default' ) &&
Object.keys( variationFilteredByProperty ).length === 0
) {
return accumulator;
}

Expand Down

1 comment on commit fa98c1b

@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 fa98c1b.
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/9211814093
📝 Reported issues:

Please sign in to comment.