make sure the theme exists

pull/444/head
yann300 4 years ago committed by GitHub
parent 6da50fb621
commit 417c13cac2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      apps/remix-ide/src/app/tabs/theme-module.js

@ -35,7 +35,8 @@ export class ThemeModule extends Plugin {
}
this.themes = themes.reduce((acc, theme) => ({ ...acc, [theme.name]: 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
}

Loading…
Cancel
Save