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