mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-12 18:29:57 -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;
|
const font = theme.getFont() ?? DEFAULT_FONT;
|
||||||
root.setProperty("--font", `"${font}"`);
|
root.setProperty("--font", `"${font}"`);
|
||||||
try {
|
try {
|
||||||
FONTS[font].load();
|
FONTS[font]?.load();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(`Failed to load font: ${font}`);
|
console.error(`Failed to load font: ${font}`);
|
||||||
}
|
}
|
||||||
|
@ -341,7 +341,7 @@ export default observer(() => {
|
||||||
const font = theme.getMonospaceFont() ?? DEFAULT_MONO_FONT;
|
const font = theme.getMonospaceFont() ?? DEFAULT_MONO_FONT;
|
||||||
root.setProperty("--monospace-font", `"${font}"`);
|
root.setProperty("--monospace-font", `"${font}"`);
|
||||||
try {
|
try {
|
||||||
MONOSPACE_FONTS[font].load();
|
MONOSPACE_FONTS[font]?.load();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(`Failed to load monospace font: ${font}`);
|
console.error(`Failed to load monospace font: ${font}`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue