From 7fc663ca75e966847243a845cff31c07737c4492 Mon Sep 17 00:00:00 2001
From: Harrison Healey <harrisonmhealey@gmail.com>
Date: Tue, 25 Apr 2017 12:39:08 -0400
Subject: PLT-6283 Hide Preview Mode error bar after enabling email
 notifications (#6180)

---
 webapp/components/admin_console/configuration_settings.jsx | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

(limited to 'webapp/components/admin_console/configuration_settings.jsx')

diff --git a/webapp/components/admin_console/configuration_settings.jsx b/webapp/components/admin_console/configuration_settings.jsx
index 47d3a665e..29901ad90 100644
--- a/webapp/components/admin_console/configuration_settings.jsx
+++ b/webapp/components/admin_console/configuration_settings.jsx
@@ -6,6 +6,7 @@ import {FormattedMessage} from 'react-intl';
 
 import ErrorStore from 'stores/error_store.jsx';
 
+import {ErrorBarTypes} from 'utils/constants.jsx';
 import * as Utils from 'utils/utils.jsx';
 
 import AdminSettings from './admin_settings.jsx';
@@ -67,10 +68,8 @@ export default class ConfigurationSettings extends AdminSettings {
     }
 
     handleSaved(newConfig) {
-        const lastError = ErrorStore.getLastError();
-
-        if (lastError && lastError.message === 'error_bar.site_url' && newConfig.ServiceSettings.SiteURL) {
-            ErrorStore.clearLastError(true);
+        if (newConfig.ServiceSettings.SiteURL) {
+            ErrorStore.clearError(ErrorBarTypes.SITE_URL);
         }
     }
 
-- 
cgit v1.2.3-1-g7c22

