mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-24 22:52:09 -05:00
fix(theme): better still just, handle it optionally
This commit is contained in:
parent
edaf2256d5
commit
3632b6b351
1 changed files with 2 additions and 2 deletions
|
@ -331,7 +331,7 @@ export default observer(() => {
|
|||
const font = theme.getFont() ?? DEFAULT_FONT;
|
||||
root.setProperty("--font", `"${font}"`);
|
||||
try {
|
||||
FONTS[font].load();
|
||||
FONTS[font]?.load();
|
||||
} catch (err) {
|
||||
console.error(`Failed to load font: ${font}`);
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ export default observer(() => {
|
|||
const font = theme.getMonospaceFont() ?? DEFAULT_MONO_FONT;
|
||||
root.setProperty("--monospace-font", `"${font}"`);
|
||||
try {
|
||||
MONOSPACE_FONTS[font].load();
|
||||
MONOSPACE_FONTS[font]?.load();
|
||||
} catch (err) {
|
||||
console.error(`Failed to load monospace font: ${font}`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue