Merge pull request #3682 from thelounge/xpaw/fix-undefined-theme

Fix settings update when unknown theme is stored
This commit is contained in:
Pavel Djundik 2020-01-22 10:28:28 +02:00 committed by GitHub
commit 510b859df9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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