Fix settings update when unknown theme is stored
This commit is contained in:
parent
79cbe63067
commit
a2349f96cb
@ -20,7 +20,7 @@ socket.once("configuration", function(data) {
|
|||||||
const currentTheme = data.themes.find((t) => t.name === store.state.settings.theme);
|
const currentTheme = data.themes.find((t) => t.name === store.state.settings.theme);
|
||||||
|
|
||||||
if (currentTheme === undefined) {
|
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) {
|
} else if (currentTheme.themeColor) {
|
||||||
document.querySelector('meta[name="theme-color"]').content = currentTheme.themeColor;
|
document.querySelector('meta[name="theme-color"]').content = currentTheme.themeColor;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user