Fix STORAGE_BUSY error in firefox
This commit is contained in:
@@ -4,11 +4,11 @@ export const LocalStorage = {
|
||||
},
|
||||
|
||||
get(key) {
|
||||
const value = window.localStorage.getItem(key);
|
||||
try {
|
||||
const value = window.localStorage.getItem(key);
|
||||
return typeof value === 'string' ? JSON.parse(value) : value;
|
||||
} catch (error) {
|
||||
return value;
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
set(key, value) {
|
||||
|
||||
Reference in New Issue
Block a user