Remove redundant checks in LocalStorage
This commit is contained in:
parent
cacbf02203
commit
5b8382c7f6
|
@ -1829,9 +1829,6 @@
|
|||
}
|
||||
|
||||
set(value) {
|
||||
if(!this.id) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
window.localStorage.setItem(this.id, value);
|
||||
} catch(ignore) {
|
||||
|
@ -1840,9 +1837,6 @@
|
|||
}
|
||||
|
||||
get() {
|
||||
if(!this.id) {
|
||||
return '';
|
||||
}
|
||||
try {
|
||||
return window.localStorage.getItem(this.id) || '';
|
||||
} catch(e) {
|
||||
|
|
|
@ -4,9 +4,6 @@ export default class LocalStorage {
|
|||
}
|
||||
|
||||
set(value) {
|
||||
if(!this.id) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
window.localStorage.setItem(this.id, value);
|
||||
} catch(ignore) {
|
||||
|
@ -15,9 +12,6 @@ export default class LocalStorage {
|
|||
}
|
||||
|
||||
get() {
|
||||
if(!this.id) {
|
||||
return '';
|
||||
}
|
||||
try {
|
||||
return window.localStorage.getItem(this.id) || '';
|
||||
} catch(e) {
|
||||
|
|
Loading…
Reference in New Issue