From fdead53ba90be76406dab1e6810e9b252d7451bf Mon Sep 17 00:00:00 2001 From: Dhyan Rai <172551908+raaid3@users.noreply.github.com> Date: Fri, 27 Jun 2025 13:34:45 -0400 Subject: [PATCH] fix(theme-constroller): fix theme flashing behavior when switching custom themes in apply() (@raaid3) (#6670) ### Description Closes [#6669](https://github.com/monkeytypegame/monkeytype/issues/6669) --- frontend/src/ts/controllers/theme-controller.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/ts/controllers/theme-controller.ts b/frontend/src/ts/controllers/theme-controller.ts index 6e12660c4..3ff1c8f5e 100644 --- a/frontend/src/ts/controllers/theme-controller.ts +++ b/frontend/src/ts/controllers/theme-controller.ts @@ -153,7 +153,9 @@ async function apply( customColorsOverride, isPreview ); - clearCustomTheme(); + if (!Config.customTheme) { + clearCustomTheme(); + } const name = customColorsOverride ? "custom" : themeName; ThemeColors.reset();