Fix settings update when unknown theme is stored

This commit is contained in:
Pavel Djundik 2020-01-08 16:00:47 +02:00
parent 79cbe63067
commit a2349f96cb

View File

@ -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;
}