diff --git a/lib/hooks/theme.js b/lib/hooks/theme.js --- a/lib/hooks/theme.js +++ b/lib/hooks/theme.js @@ -48,12 +48,10 @@ if (themePreference === globalThemeInfo.preference) { return; } - - let theme = themePreference; - if (themePreference === 'system') { - theme = globalThemeInfo.systemTheme; - } - + const theme = + themePreference === 'system' + ? globalThemeInfo.systemTheme + : themePreference; dispatch({ type: updateThemeInfoActionType, payload: {