diff --git a/src/utils/quickCss.ts b/src/utils/quickCss.ts index 44b7946b6..e69e3c09d 100644 --- a/src/utils/quickCss.ts +++ b/src/utils/quickCss.ts @@ -19,8 +19,10 @@ import { addSettingsListener, Settings } from "@api/Settings"; import { Toasts } from "@webpack/common"; +import { Logger } from "./Logger"; import { compileUsercss } from "./themes/usercss/compiler"; +const logger = new Logger("QuickCSS"); let style: HTMLStyleElement; let themesStyle: HTMLStyleElement; @@ -66,7 +68,11 @@ async function initThemes() { if (IS_WEB) { for (const theme of enabledThemes) { - const themeData = await VencordNative.themes.getThemeData(theme); + try { + var themeData = await VencordNative.themes.getThemeData(theme); + } catch (e) { + logger.error("Failed to get theme data for", theme, e); + } if (!themeData) continue; const blob = new Blob([themeData], { type: "text/css" }); diff --git a/src/utils/themes/usercss/compiler.ts b/src/utils/themes/usercss/compiler.ts index 6e4617991..f7185e180 100644 --- a/src/utils/themes/usercss/compiler.ts +++ b/src/utils/themes/usercss/compiler.ts @@ -55,7 +55,11 @@ const preprocessors: { [preprocessor: string]: (text: string, vars: Record