summaryrefslogtreecommitdiffstats
path: root/webapp/stores/error_store.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-05-26 04:54:49 -0700
committerJoram Wilander <jwawilander@gmail.com>2016-05-26 07:54:49 -0400
commit7b2538fc6c62175622b46d497c4048a7ccb762d1 (patch)
treed2fa111f9ab1014931bb921445a22a80e69da5a7 /webapp/stores/error_store.jsx
parent510fc33fd94d6a5059083e027faebf1a5ecf2ffa (diff)
downloadchat-7b2538fc6c62175622b46d497c4048a7ccb762d1.tar.gz
chat-7b2538fc6c62175622b46d497c4048a7ccb762d1.tar.bz2
chat-7b2538fc6c62175622b46d497c4048a7ccb762d1.zip
PLT-2952 fixing preview mode error message (#3113)
Diffstat (limited to 'webapp/stores/error_store.jsx')
-rw-r--r--webapp/stores/error_store.jsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/webapp/stores/error_store.jsx b/webapp/stores/error_store.jsx
index 278e252c0..4a357472d 100644
--- a/webapp/stores/error_store.jsx
+++ b/webapp/stores/error_store.jsx
@@ -64,8 +64,10 @@ class ErrorStoreClass extends EventEmitter {
clearLastError() {
var lastError = this.getLastError();
+
+ // preview message can only be cleared by clearPreviewError
if (lastError && lastError.email_preview) {
- this.ignore_email_preview = true;
+ return;
}
BrowserStore.removeGlobalItem('last_error');
@@ -74,6 +76,12 @@ class ErrorStoreClass extends EventEmitter {
this.emitChange();
}
}
+
+ clearPreviewError() {
+ this.ignore_email_preview = true;
+ this.storeLastError('');
+ this.clearLastError();
+ }
}
var ErrorStore = new ErrorStoreClass();