summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/components/user_settings/user_settings_general.jsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/webapp/components/user_settings/user_settings_general.jsx b/webapp/components/user_settings/user_settings_general.jsx
index be1d1e6c5..8e4954e5a 100644
--- a/webapp/components/user_settings/user_settings_general.jsx
+++ b/webapp/components/user_settings/user_settings_general.jsx
@@ -160,6 +160,11 @@ class UserSettingsGeneralTab extends React.Component {
const email = this.state.email.trim().toLowerCase();
const confirmEmail = this.state.confirmEmail.trim().toLowerCase();
+ if (user.email === email) {
+ this.updateSection('');
+ return;
+ }
+
const {formatMessage} = this.props.intl;
if (email === '' || !Utils.isEmail(email)) {
this.setState({emailError: formatMessage(holders.validEmail), clientError: '', serverError: ''});
@@ -171,11 +176,6 @@ class UserSettingsGeneralTab extends React.Component {
return;
}
- if (user.email === email) {
- this.updateSection('');
- return;
- }
-
user.email = email;
this.submitUser(user, true);
}