From aa5a911edc9d78cb0c462bbd525287e0f3a122ec Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Sat, 25 Jan 2020 09:58:53 -0500
Subject: Fixing front end error messages. Fixes #462

---
 ui/src/components/modlog.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'ui/src/components/modlog.tsx')

diff --git a/ui/src/components/modlog.tsx b/ui/src/components/modlog.tsx
index dd651092..e03f1ff7 100644
--- a/ui/src/components/modlog.tsx
+++ b/ui/src/components/modlog.tsx
@@ -425,7 +425,7 @@ export class Modlog extends Component<any, ModlogState> {
   parseMessage(msg: WebSocketJsonResponse) {
     console.log(msg);
     let res = wsJsonToRes(msg);
-    if (res.error) {
+    if (msg.error) {
       toast(i18n.t(msg.error), 'danger');
       return;
     } else if (res.op == UserOperation.GetModlog) {
-- 
cgit v1.2.3

