fix: wrap localStorage sets in try/catch
This commit is contained in:
@ -70,7 +70,11 @@ class Storage {
|
||||
extend(storage, object);
|
||||
|
||||
// Update storage
|
||||
window.localStorage.setItem(this.key, JSON.stringify(storage));
|
||||
try {
|
||||
window.localStorage.setItem(this.key, JSON.stringify(storage));
|
||||
} catch (_) {
|
||||
// Do nothing
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user