[CYS - Core] improve logic to find active fonts (#44724)
* improve logic to find active fonts * Add changefile(s) from automation for the following project(s): woocommerce * Update changelog * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
This commit is contained in:
parent
484398cfe1
commit
62f2782715
|
@ -95,10 +95,10 @@ export const VariationContainer = ( { variation, children } ) => {
|
|||
// With the Font Library, the fontFamilies object contains an array of font families installed with the Font Library under the key 'custom'.
|
||||
// We need to compare only the active theme font families, so we compare the theme font families with the current variation.
|
||||
const { theme } = user.settings.typography.fontFamilies;
|
||||
|
||||
return isEqual( variation.settings.typography, {
|
||||
fontFamilies: { theme },
|
||||
} );
|
||||
return variation.settings.typography?.fontFamilies.theme.every(
|
||||
( { slug } ) =>
|
||||
theme.some( ( { slug: themeSlug } ) => themeSlug === slug )
|
||||
);
|
||||
}, [ user, variation ] );
|
||||
|
||||
let label = variation?.title;
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
Comment: [CYS - Core] improve logic to find active fonts
|
||||
|
Loading…
Reference in New Issue