diff options
author | enahum <nahumhbl@gmail.com> | 2016-05-16 20:09:48 -0300 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-05-16 16:09:48 -0700 |
commit | 0b53dd917d2664bfa7502343e91c9168a346df3c (patch) | |
tree | 440c58e71a3f49106b47995d5cdc07330bd81696 /webapp/components | |
parent | 34780f3aea78bbf5dd35230ba7ad4a67618b42a0 (diff) | |
download | chat-0b53dd917d2664bfa7502343e91c9168a346df3c.tar.gz chat-0b53dd917d2664bfa7502343e91c9168a346df3c.tar.bz2 chat-0b53dd917d2664bfa7502343e91c9168a346df3c.zip |
PLT-2020 Fix Clicking save without changing your email shows an error message (#3008)
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/user_settings/user_settings_general.jsx | 10 |
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); } |