From 6bcfe4ecad63d9309a0efe0f50210cb20f1b6319 Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Wed, 10 Feb 2016 09:21:16 -0500
Subject: Fix canceling themes when user has no theme

---
 web/react/components/user_settings/user_settings_modal.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'web/react/components/user_settings/user_settings_modal.jsx')

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);
         }
     }
-- 
cgit v1.2.3-1-g7c22

