Commit 0b53dd91 authored by enahum's avatar enahum Committed by Corey Hulen
Browse files

PLT-2020 Fix Clicking save without changing your email shows an error message (#3008)

parent 34780f3a
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment