mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 16:55:12 +08:00
Merge branch 'master' into losowsky-patch-2
This commit is contained in:
@@ -114,11 +114,11 @@ class Profile extends React.Component {
|
||||
|
||||
isSaveEnabled = () => {
|
||||
const { formData } = this.state;
|
||||
const { emailAddress, username } = this.props;
|
||||
const { root: { me: { username, email } } } = this.props;
|
||||
const formHasErrors = !!Object.keys(this.state.errors).length;
|
||||
const validUsername =
|
||||
formData.newUsername && formData.newUsername !== username;
|
||||
const validEmail = formData.newEmail && formData.newEmail !== emailAddress;
|
||||
const validEmail = formData.newEmail && formData.newEmail !== email;
|
||||
|
||||
return !formHasErrors && (validUsername || validEmail);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user