1
Fork 0
mirror of https://github.com/RGBCube/cinny synced 2025-08-01 09:27:46 +00:00

Fixed error on register, zoom on safari and removed webpack copying env vars to bundle

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2021-11-11 14:09:06 +05:30
parent 6e9394ec7a
commit 1207f5abad
3 changed files with 2 additions and 6 deletions

View file

@ -332,7 +332,7 @@ function Register({ registerInfo, loginFlow, baseUrl }) {
actions.setSubmitting(false);
}).catch((err) => {
const msg = err.message || err.error;
if (['M_USER_IN_USE', 'M_INVALID_USERNAME', 'M_EXCLUSIVE'].indexOf(err.errcode) > 0) {
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 });
} else if (msg) actions.setErrors({ other: msg });