From 022cb7ffa1517e7ac59a1a42e62a37b19db9f646 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Wed, 20 Jul 2016 17:33:23 -0400
Subject: If user tries to change email to current email, do nothing (#3643)

---
 webapp/components/user_settings/user_settings_general.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'webapp/components/user_settings/user_settings_general.jsx')

diff --git a/webapp/components/user_settings/user_settings_general.jsx b/webapp/components/user_settings/user_settings_general.jsx
index 2a411a607..8dce4deed 100644
--- a/webapp/components/user_settings/user_settings_general.jsx
+++ b/webapp/components/user_settings/user_settings_general.jsx
@@ -167,7 +167,7 @@ class UserSettingsGeneralTab extends React.Component {
 
         const {formatMessage} = this.props.intl;
 
-        if (user.email === email && confirmEmail === '') {
+        if (email === user.email && (confirmEmail === '' || confirmEmail === user.email)) {
             this.updateSection('');
             return;
         }
-- 
cgit v1.2.3-1-g7c22

