mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
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
39addff34f
commit
47a4b9c433
@ -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
Block a user