forked from marva/sumorobot-web
Update utils.js
This commit is contained in:
parent
782935644d
commit
661c0134bc
@ -6,7 +6,7 @@ function getLocalStorageItem(item) {
|
|||||||
try {
|
try {
|
||||||
return localStorage.getItem(item);
|
return localStorage.getItem(item);
|
||||||
// Failed to access localStorage
|
// Failed to access localStorage
|
||||||
} catch {
|
} catch(err) {
|
||||||
// Return empty result
|
// Return empty result
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -20,5 +20,5 @@ function setLocalStorageItem(item, value) {
|
|||||||
try {
|
try {
|
||||||
localStorage.setItem(item, value)
|
localStorage.setItem(item, value)
|
||||||
// Failed to access localStorage
|
// Failed to access localStorage
|
||||||
} catch {}
|
} catch(err) {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user