Skip to content

Commit 3423b8e

Browse files
committed
fix: add breaks to loop to get out early
1 parent d856a22 commit 3423b8e

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ export const getTypographyTypeScale = ( typographySettings, deviceType ) => {
2323
typographySettings[ tag ]?.[ fontSizeUnitKey ] !== computedApplied[ tag ]?.[ fontSizeUnitKey ]
2424
) {
2525
typeScale = 'custom'
26+
break
2627
}
2728
}
2829
} else {
2930
typeScale = 'none'
3031
for ( const tag of tags ) {
3132
if ( typographySettings[ tag ]?.[ fontSizeKey ] ) {
3233
typeScale = 'custom'
34+
break
3335
}
3436
}
3537
}

0 commit comments

Comments
 (0)