Remove redundant checks in LocalStorage

This commit is contained in:
David Evans 2020-01-19 23:02:17 +00:00
parent cacbf02203
commit 5b8382c7f6
2 changed files with 0 additions and 12 deletions

View File

@ -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) {

View File

@ -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) {