Skip to content

Commit fdead53

Browse files
authored
fix(theme-constroller): fix theme flashing behavior when switching custom themes in apply() (@raaid3) (monkeytypegame#6670)
### Description Closes [monkeytypegame#6669](monkeytypegame#6669) <!-- the issue(s) your PR resolves if any (delete if that is not the case) --> <!-- please also reference any issues and or PRs related to your pull request --> <!-- Also remove it if you are not following any issues. --> <!-- pro tip: you can mention an issue, PR, or discussion on GitHub by referencing its hash number e.g: [monkeytypegame#1234](monkeytypegame#1234) --> <!-- pro tip: you can press . (dot or period) in the code tab of any GitHub repo to get access to GitHub's VS Code web editor Enjoy! :) -->
1 parent 83a34c6 commit fdead53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/src/ts/controllers/theme-controller.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ async function apply(
153153
customColorsOverride,
154154
isPreview
155155
);
156-
clearCustomTheme();
156+
if (!Config.customTheme) {
157+
clearCustomTheme();
158+
}
157159
const name = customColorsOverride ? "custom" : themeName;
158160

159161
ThemeColors.reset();

0 commit comments

Comments
 (0)