Skip to content

Commit 5f158f7

Browse files
remove type coersion
1 parent 290a729 commit 5f158f7

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/core/sass/brand.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,9 @@ const brandTypographyLayer = (
356356
resolvedFontOptions = { family: resolvedFontOptions };
357357
}
358358
const result: HTMLFontInformation = {};
359-
// This is an ugly hack:
360-
// resolvedFontOptions doesn't always have 'family', but at this
361-
// point in the code we know resolvedFontOptions is an object
362-
// that we can attempt to extract the family from.
363-
const family =
364-
(resolvedFontOptions as Record<string, string | undefined>).family;
365-
result.family = family;
359+
if ("family" in resolvedFontOptions) {
360+
result.family = resolvedFontOptions.family;
361+
}
366362
for (
367363
const entry of [
368364
"line-height",

0 commit comments

Comments
 (0)