summaryrefslogtreecommitdiffstats
path: root/ui/src/components/user.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-01-25 09:58:53 -0500
committerDessalines <tyhou13@gmx.com>2020-01-25 09:58:53 -0500
commitaa5a911edc9d78cb0c462bbd525287e0f3a122ec (patch)
tree850ef9040582f0e140d103a5b4bfe87e8b116e71 /ui/src/components/user.tsx
parent691d05222bc1009ec7373336ee097b2bcda5ada5 (diff)
Fixing front end error messages. Fixes #462
Diffstat (limited to 'ui/src/components/user.tsx')
-rw-r--r--ui/src/components/user.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx
index 09129d67..1475de6b 100644
--- a/ui/src/components/user.tsx
+++ b/ui/src/components/user.tsx
@@ -1016,12 +1016,12 @@ export class User extends Component<any, UserState> {
parseMessage(msg: WebSocketJsonResponse) {
console.log(msg);
let res = wsJsonToRes(msg);
- if (res.error) {
+ if (msg.error) {
toast(i18n.t(msg.error), 'danger');
this.state.deleteAccountLoading = false;
this.state.avatarLoading = false;
this.state.userSettingsLoading = false;
- if (res.error == 'couldnt_find_that_username_or_email') {
+ if (msg.error == 'couldnt_find_that_username_or_email') {
this.context.router.history.push('/');
}
this.setState(this.state);