Fix storage usage when disabled
This commit is contained in:
parent
8b36867093
commit
4eb19d19a5
1 changed files with 1 additions and 3 deletions
|
@ -64,13 +64,11 @@ function usableLocalStorage() {
|
||||||
// preferences deny access to localStorage, e.g., to prevent storage of
|
// preferences deny access to localStorage, e.g., to prevent storage of
|
||||||
// "cookies" (or cookie-likes, as is the case here).
|
// "cookies" (or cookie-likes, as is the case here).
|
||||||
try {
|
try {
|
||||||
window.localStorage;
|
return window.localStorage !== null && window.localStorage !== undefined;
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
// Storage is supported, but browser preferences deny access to it.
|
// Storage is supported, but browser preferences deny access to it.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateLocalStorage(name, value) {
|
function updateLocalStorage(name, value) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue