fix checking the current theme

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

@ -35,8 +35,8 @@ export class ThemeModule extends Plugin {
}
this.themes = themes.reduce((acc, theme) => ({ ...acc, [theme.name]: theme }), {})
const theme = (new QueryParams()).get().theme
const currentSetting = this._deps.config.get('settings/theme')
this.active = theme || (currentSetting && this.themes[currentSetting]) || 'Dark'
const currentTheme = this.themes[this._deps.config.get('settings/theme')] ? this._deps.config.get('settings/theme') : null
this.active = theme || currentTheme || 'Dark'
this.forced = theme !== undefined
}

Loading…
Cancel
Save