make edit user saveable again

This commit is contained in:
Maren Süwer
2019-01-28 14:54:01 +01:00
parent af3166c2e6
commit 214ef26802

View File

@@ -63,14 +63,19 @@ class UserForm extends React.Component<Props, State> {
isValid = () => {
const user = this.state.user;
const createUserIsValid = !this.props.user
? this.state.nameValidationError ||
this.isFalsy(user.name) ||
!this.state.passwordValid
: false;
return !(
this.state.nameValidationError ||
createUserIsValid ||
this.state.mailValidationError ||
this.state.displayNameValidationError ||
this.isFalsy(user.name) ||
this.isFalsy(user.displayName) ||
this.isFalsy(user.mail) ||
!this.state.passwordValid
this.isFalsy(user.mail)
);
};