Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
πŸ› fix "failed" button flash on password reset (#791)
Browse files Browse the repository at this point in the history
closes TryGhost/Ghost#8688
- `reset` task wasn't returning a truthy value on success so `gh-task-button` flashed the "retry" state before the transition happened
  • Loading branch information
kevinansfield authored and aileen committed Jul 20, 2017
1 parent addba04 commit 33be8eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/reset.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default Controller.extend(ValidationEngine, {
});
this.get('notifications').showAlert(resp.passwordreset[0].message, {type: 'warn', delayed: true, key: 'password.reset'});
this.get('session').authenticate('authenticator:oauth2', this.get('email'), credentials.newPassword);
return true;
} catch (error) {
this.get('notifications').showAPIError(error, {key: 'password.reset'});
}
Expand All @@ -69,7 +70,7 @@ export default Controller.extend(ValidationEngine, {

actions: {
submit() {
this.get('resetPassword').perform();
return this.get('resetPassword').perform();
}
}
});

0 comments on commit 33be8eb

Please sign in to comment.