From b74215a683adcca50ac2d7d1c06c90a1bfd779bd Mon Sep 17 00:00:00 2001 From: aNOOBis <69043738+aNOOBisTheGod@users.noreply.github.com> Date: Sun, 26 Jun 2022 05:55:26 -0700 Subject: [PATCH] custom theme edit fix (#3236) --- frontend/src/ts/popups/simple-popups.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/ts/popups/simple-popups.ts b/frontend/src/ts/popups/simple-popups.ts index 793be377c..3ecb4073a 100644 --- a/frontend/src/ts/popups/simple-popups.ts +++ b/frontend/src/ts/popups/simple-popups.ts @@ -1088,12 +1088,13 @@ list["updateCustomTheme"] = new SimplePopup( } const newTheme = { - name: name, + name: name.replaceAll(" ", "_"), colors: newColors, }; Loader.show(); - await DB.editCustomTheme(customTheme._id, newTheme); + const validation = await DB.editCustomTheme(customTheme._id, newTheme); Loader.hide(); + if (!validation) return; UpdateConfig.setCustomThemeColors(newColors); Notifications.add("Custom theme updated", 1); ThemePicker.refreshButtons();