Skip to content

Commit

Permalink
Update packages/edit-site/src/hooks/use-theme-style-variations/use-th…
Browse files Browse the repository at this point in the history
…eme-style-variations-by-property.js

Co-authored-by: Jerry Jones <jones.jeremydavid@gmail.com>
  • Loading branch information
scruffian and jeryj authored Jul 2, 2024
1 parent 66a7f58 commit 3ac8dbc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ export function removePropertyFromObject( object, property ) {
* @param {Object} variation.styles The styles of the variation.
* @return {boolean} Whether the variation is empty.
*/
function isEmptyStyleVariation( { title, settings, styles } ) {
function hasThemeVariation( { title, settings, styles } ) {
return (
title !== __( 'Default' ) && // Always preserve the default variation.
Object.keys( settings ).length === 0 &&
Object.keys( styles ).length === 0
title !== __( 'Default' ) || // Always preserve the default variation.
Object.keys( settings ).length > 0 ||
Object.keys( styles ).length > 0
);
}

Expand Down

0 comments on commit 3ac8dbc

Please sign in to comment.