diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-02-10 11:09:38 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-02-10 11:09:38 -0500 |
commit | 6bfb90ccc54ec12f7991de2af6504f2807a97339 (patch) | |
tree | cd650fd6c6c638158fbbb0a9d9cd0a574961d2ce | |
parent | 6225522478f61aa134d167954d3116c72a6148c3 (diff) | |
parent | 6bcfe4ecad63d9309a0efe0f50210cb20f1b6319 (diff) | |
download | chat-6bfb90ccc54ec12f7991de2af6504f2807a97339.tar.gz chat-6bfb90ccc54ec12f7991de2af6504f2807a97339.tar.bz2 chat-6bfb90ccc54ec12f7991de2af6504f2807a97339.zip |
Merge pull request #2132 from mattermost/no-theme-fix2
RC2 - Fix canceling themes when user has no theme
-rw-r--r-- | web/react/components/user_settings/user_settings_modal.jsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/web/react/components/user_settings/user_settings_modal.jsx b/web/react/components/user_settings/user_settings_modal.jsx index a7541073e..7e911f09a 100644 --- a/web/react/components/user_settings/user_settings_modal.jsx +++ b/web/react/components/user_settings/user_settings_modal.jsx @@ -7,6 +7,7 @@ import SettingsSidebar from '../settings_sidebar.jsx'; import UserStore from '../../stores/user_store.jsx'; import * as Utils from '../../utils/utils.jsx'; +import Constants from '../../utils/constants.jsx'; const Modal = ReactBootstrap.Modal; @@ -224,7 +225,9 @@ class UserSettingsModal extends React.Component { resetTheme() { const user = UserStore.getCurrentUser(); - if (user.theme_props != null) { + if (user.theme_props == null) { + Utils.applyTheme(Constants.THEMES.default); + } else { Utils.applyTheme(user.theme_props); } } |