Refactored check with regexp to error type checking

- Changed as per review here: https://github.com/TryGhost/Ghost-Admin/pull/1560#discussion_r420040384
This commit is contained in:
Nazar Gargol 2020-05-06 00:05:19 +12:00
parent d7597e426e
commit 9b560a1e12
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ export default Controller.extend(ValidationEngine, {
this.set('flowErrors', (mainError.context.string || mainError.message.string));
if (mainError.message.string.match(/your password must be reset/i)) {
if (mainError.type === 'PasswordResetRequiredError') {
this.set('passwordResetEmailSent', true);
}