Merge pull request #3682 from thelounge/xpaw/fix-undefined-theme
Fix settings update when unknown theme is stored
This commit is contained in:
commit
510b859df9
@ -20,7 +20,7 @@ socket.once("configuration", function(data) {
|
||||
const currentTheme = data.themes.find((t) => t.name === store.state.settings.theme);
|
||||
|
||||
if (currentTheme === undefined) {
|
||||
store.commit("settings/update", {name: "theme", value: data.defaultTheme, sync: true});
|
||||
store.dispatch("settings/update", {name: "theme", value: data.defaultTheme, sync: true});
|
||||
} else if (currentTheme.themeColor) {
|
||||
document.querySelector('meta[name="theme-color"]').content = currentTheme.themeColor;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user