Don't erase password confirm on registration error

Fixes: https://github.com/vector-im/riot-web/issues/11395

Problem here was that the form gets re-mounted but there wasn't a facility
to preserve the password confirmation field.  Since the form validates
that the passwords are equal, if we mount with a password supplied we
just copy it over.
pull/21833/head
Zoe 2020-05-01 11:03:48 +01:00
parent bff2130b2d
commit 8a02e064bd
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ export default createReactClass({
email: this.props.defaultEmail || "",
phoneNumber: this.props.defaultPhoneNumber || "",
password: this.props.defaultPassword || "",
passwordConfirm: "",
passwordConfirm: this.props.defaultPassword || "",
passwordComplexity: null,
passwordSafe: false,
};