fix: empty default font on electron app (#481)

This commit is contained in:
Kaffi Y. 2024-09-18 21:52:49 +08:00 committed by GitHub
parent a2eeb253b3
commit 4f9d4f26f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 4 deletions

View File

@ -27,10 +27,12 @@ const useFontDataElectron = () => {
queryKey: ["systemFonts"],
})
return [FALLBACK_FONT].concat(data || []).map((font) => ({
label: font,
value: font,
}))
return [{ label: FALLBACK_FONT, value: "inherit" }].concat(
(data || []).map((font) => ({
label: font,
value: font,
})),
)
}
const useFontDataWeb = () => [