Skip to content

Commit 1cb15b0

Browse files
committed
fix: also clean typography style for consistency
1 parent abe4a87 commit 1cb15b0

File tree

1 file changed

+2
-2
lines changed
  • src/plugins/global-settings/typography

1 file changed

+2
-2
lines changed

src/plugins/global-settings/typography/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ addFilter( 'stackable.global-settings.inspector', 'stackable/global-typography',
349349

350350
const getIsAllowReset = selector => {
351351
const currentFontPair = getCurrentFontPair()
352-
const typographyStyle = typographySettings[ selector ] || {}
352+
const typographyStyle = cleanTypographyStyle( typographySettings[ selector ] ) || {}
353353
if ( ! isEditingFontPair && currentFontPair ) {
354354
// Clean style object to be consistent with changeStyles operation
355355
const fontPairStyle = cleanTypographyStyle( currentFontPair.typography?.[ selector ] ) || {}
@@ -384,7 +384,7 @@ addFilter( 'stackable.global-settings.inspector', 'stackable/global-typography',
384384
}
385385
// Clean style object to be consistent with changeStyles operation
386386
const fontPairStyle = cleanTypographyStyle( currentFontPair.typography?.[ selector ] ) || {}
387-
const typographyStyle = typographySettings[ selector ] || {}
387+
const typographyStyle = cleanTypographyStyle( typographySettings[ selector ] ) || {}
388388

389389
if ( ! Array.isArray( typographyStyle ) &&
390390
fontPairStyle.fontFamily &&

0 commit comments

Comments
 (0)