Unverified Commit 417c13ca authored by yann300's avatar yann300 Committed by GitHub

make sure the theme exists

parent 6da50fb6
...@@ -35,7 +35,8 @@ export class ThemeModule extends Plugin { ...@@ -35,7 +35,8 @@ export class ThemeModule extends Plugin {
} }
this.themes = themes.reduce((acc, theme) => ({ ...acc, [theme.name]: theme }), {}) this.themes = themes.reduce((acc, theme) => ({ ...acc, [theme.name]: theme }), {})
const theme = (new QueryParams()).get().theme const theme = (new QueryParams()).get().theme
this.active = theme || this._deps.config.get('settings/theme') || 'Dark' const currentSetting = this._deps.config.get('settings/theme')
this.active = theme || (currentSetting && this.themes[currentSetting]) || 'Dark'
this.forced = theme !== undefined this.forced = theme !== undefined
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment