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:
parent
d7597e426e
commit
9b560a1e12
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue