PLT-478 partial fix for local storage getting filled up. This will be fixed for good with multi-login stuff

Этот коммит содержится в:
=Corey Hulen
2015-10-06 13:20:46 -07:00
родитель cbe1ab8dba
Коммит 8de30c804f

Просмотреть файл

@@ -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) {