summaryrefslogtreecommitdiffstats
path: root/web/react/stores
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-10-06 13:20:46 -0700
committer=Corey Hulen <corey@hulen.com>2015-10-06 13:20:46 -0700
commit8de30c804f98a0aac381e16243cb52b3e3e63fcc (patch)
treee2c588fb42821bbc13364e6e2b7b5710585e7eca /web/react/stores
parentcbe1ab8dbac9502017a5ae5cd4eb01d9c43772e2 (diff)
downloadchat-8de30c804f98a0aac381e16243cb52b3e3e63fcc.tar.gz
chat-8de30c804f98a0aac381e16243cb52b3e3e63fcc.tar.bz2
chat-8de30c804f98a0aac381e16243cb52b3e3e63fcc.zip
PLT-478 partial fix for local storage getting filled up. This will be fixed for good with multi-login stuff
Diffstat (limited to 'web/react/stores')
-rw-r--r--web/react/stores/browser_store.jsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/web/react/stores/browser_store.jsx b/web/react/stores/browser_store.jsx
index e45d3d981..27a74fb2b 100644
--- a/web/react/stores/browser_store.jsx
+++ b/web/react/stores/browser_store.jsx
@@ -41,7 +41,13 @@ class BrowserStoreClass {
}
setGlobalItem(name, value) {
- localStorage.setItem(name, JSON.stringify(value));
+ try {
+ localStorage.setItem(name, JSON.stringify(value));
+ } catch (err) {
+ console.log('An error occurred while setting local storage, clearing all props'); //eslint-disable-line no-console
+ localStorage.clear();
+ window.location.href = window.location.href;
+ }
}
getGlobalItem(name, defaultValue) {