refactor(storage-manager): remove unnecessary null param for JSON.parse
This commit is contained in:
parent
93adcd9811
commit
5d0e376eb4
@ -191,7 +191,7 @@ export class StorageManager {
|
|||||||
let state;
|
let state;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
state = JSON.parse(window.localStorage.getItem(this.namespace) || null);
|
state = JSON.parse(window.localStorage.getItem(this.namespace));
|
||||||
} catch {
|
} catch {
|
||||||
state = null;
|
state = null;
|
||||||
}
|
}
|
||||||
@ -281,7 +281,7 @@ export class StorageManager {
|
|||||||
let state;
|
let state;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
state = JSON.parse(window.sessionStorage.getItem(this.namespace) || null);
|
state = JSON.parse(window.sessionStorage.getItem(this.namespace));
|
||||||
} catch {
|
} catch {
|
||||||
state = null;
|
state = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user