From 39b35b7b394cdc2391beaff8b96cd733400ebcb8 Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Mon, 8 Feb 2016 07:28:04 -0500
Subject: Fix cancel bug

---
 web/react/components/user_settings/user_settings_modal.jsx | 4 +++-
 1 file changed, 3 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 57796d559..e0b72157b 100644
--- a/web/react/components/user_settings/user_settings_modal.jsx
+++ b/web/react/components/user_settings/user_settings_modal.jsx
@@ -216,7 +216,9 @@ class UserSettingsModal extends React.Component {
         } else {
             if (this.state.active_section === 'theme' && section !== 'theme') {
                 const user = UserStore.getCurrentUser();
-                Utils.applyTheme(user.theme_props);
+                if (user.theme_props != null) {
+                    Utils.applyTheme(user.theme_props);
+                }
             }
             this.setState({active_section: section});
         }
-- 
cgit v1.2.3-1-g7c22

