Dont clear email if verification cancelled by user
This commit is contained in:
parent
392b47e200
commit
74a6c1e8d8
1 changed files with 3 additions and 1 deletions
|
@ -179,6 +179,7 @@ export default class EmailAddresses extends React.Component {
|
|||
|
||||
this.setState({continueDisabled: true});
|
||||
this.state.addTask.checkEmailLinkClicked().then(([finished]) => {
|
||||
let newEmailAddress = this.state.newEmailAddress;
|
||||
if (finished) {
|
||||
const email = this.state.newEmailAddress;
|
||||
const emails = [
|
||||
|
@ -186,12 +187,13 @@ export default class EmailAddresses extends React.Component {
|
|||
{ address: email, medium: "email" },
|
||||
];
|
||||
this.props.onEmailsChange(emails);
|
||||
newEmailAddress = "";
|
||||
}
|
||||
this.setState({
|
||||
addTask: null,
|
||||
continueDisabled: false,
|
||||
verifying: false,
|
||||
newEmailAddress: "",
|
||||
newEmailAddress,
|
||||
});
|
||||
}).catch((err) => {
|
||||
this.setState({continueDisabled: false});
|
||||
|
|
Loading…
Reference in a new issue