From a2f5ad0d1422001a0fbbad4dd0004faf5244ea55 Mon Sep 17 00:00:00 2001
From: Corey Hulen <corey@hulen.com>
Date: Mon, 17 Apr 2017 07:55:26 -0700
Subject: PLT-5863 Fixing double display of error message (#6104)

---
 webapp/actions/channel_actions.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'webapp/actions/channel_actions.jsx')

diff --git a/webapp/actions/channel_actions.jsx b/webapp/actions/channel_actions.jsx
index 322ee8160..3f4ab210d 100644
--- a/webapp/actions/channel_actions.jsx
+++ b/webapp/actions/channel_actions.jsx
@@ -432,10 +432,10 @@ export function createChannel(channel, success, error) {
             }
         },
         (err) => {
-            AsyncClient.dispatchError(err, 'createChannel');
-
             if (error) {
                 error(err);
+            } else {
+                AsyncClient.dispatchError(err, 'createChannel');
             }
         }
     );
-- 
cgit v1.2.3-1-g7c22

