Fix #1784 change error message incorrect code

This commit is contained in:
Jim LAURIE 2018-10-02 20:03:58 +02:00
parent 98bd2d72de
commit 03b03deca3

View File

@ -82,7 +82,11 @@ export function* submitForm(action) {
yield put(hideLoginErrorsInput(true));
break;
case 'reset-password':
formErrors = [{ name: 'password', errors: [{ id: 'users-permissions.Auth.form.error.password.matching' }] }];
if (errors[0].id === 'users-permissions.Auth.form.error.code.provide') {
strapi.notification.error(errors[0].id);
} else {
formErrors = [{ name: 'password', errors }];
}
break;
case 'register': {
const target = includes(get(errors, ['0', 'id']), 'username') ? 'username' : 'email';