Bug fixed

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2021-11-14 11:31:22 +05:30
parent 14cd84dab7
commit 1137c11c59
6 changed files with 13 additions and 30 deletions

View file

@ -333,7 +333,7 @@ function Register({ registerInfo, loginFlow, baseUrl }) {
}).catch((err) => {
const msg = err.message || err.error;
if (['M_USER_IN_USE', 'M_INVALID_USERNAME', 'M_EXCLUSIVE'].indexOf(err.errcode) > -1) {
actions.setErrors({ username: err.errCode === 'M_USER_IN_USE' ? 'Username is already taken' : msg });
actions.setErrors({ username: err.errcode === 'M_USER_IN_USE' ? 'Username is already taken' : msg });
} else if (msg) actions.setErrors({ other: msg });
actions.setSubmitting(false);