From 8068af684cedfc8b2880aaf8568d697de4d60c73 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 22 Sep 2020 23:36:56 +0200 Subject: [PATCH] fix checking the current theme --- apps/remix-ide/src/app/tabs/theme-module.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/theme-module.js b/apps/remix-ide/src/app/tabs/theme-module.js index d9de63ec5f..834f632aa2 100644 --- a/apps/remix-ide/src/app/tabs/theme-module.js +++ b/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 }