mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-24 23:04:00 +08:00
parent
2a5754a4c8
commit
9f8adbbb25
1 changed files with 1 additions and 2 deletions
|
@ -206,7 +206,6 @@ export function clearPreview(applyTheme = true): void {
|
|||
let themesList: string[] = [];
|
||||
|
||||
async function changeThemeList(): Promise<void> {
|
||||
if (!DB.getSnapshot()) return;
|
||||
const themes = await Misc.getThemesList();
|
||||
if (Config.randomTheme === "fav" && Config.favThemes.length > 0) {
|
||||
themesList = Config.favThemes;
|
||||
|
@ -222,7 +221,7 @@ async function changeThemeList(): Promise<void> {
|
|||
themesList = themes.map((t) => {
|
||||
return t.name;
|
||||
});
|
||||
} else {
|
||||
} else if (Config.randomTheme === "custom" && DB.getSnapshot()) {
|
||||
themesList = DB.getSnapshot().customThemes.map((ct) => ct._id);
|
||||
}
|
||||
Misc.shuffle(themesList);
|
||||
|
|
Loading…
Reference in a new issue