Fix error when accessing undefined StoredState values
This commit is contained in:
parent
de88e6a9d6
commit
04ab913b72
1 changed files with 2 additions and 1 deletions
3
state.js
3
state.js
|
@ -179,7 +179,8 @@ export class StoredState extends State {
|
||||||
|
|
||||||
get(prop) {
|
get(prop) {
|
||||||
if (prop == "value") prop = this.#valueKey
|
if (prop == "value") prop = this.#valueKey
|
||||||
return JSON.parse(this.#storage[prop])
|
const value = this.#storage[prop]
|
||||||
|
return value && JSON.parse(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue