flatten may return undefined (#9387)

This commit is contained in:
Samuel Newman
2025-11-14 17:46:20 +02:00
committed by GitHub
parent b422765aed
commit c92ac4abc1
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -25,7 +25,8 @@ export function normalizeTextStyles(
fontFamily: Alf['fonts']['family']
} & Pick<Alf, 'flags'>,
) {
const s = flatten(styles)
const s = flatten(styles) ?? {}
// should always be defined on these components
s.fontSize = (s.fontSize || atoms.text_md.fontSize) * fontScale