mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Merge pull request #949 from mattermost/PLT-478
PLT-478 partial fix for local storage getting filled up. This will b…
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user