Fix error when accessing undefined StoredState values

This commit is contained in:
Talia 2023-12-22 00:59:28 +01:00
parent de88e6a9d6
commit 04ab913b72
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

View file

@ -179,7 +179,8 @@ export class StoredState extends State {
get(prop) {
if (prop == "value") prop = this.#valueKey
return JSON.parse(this.#storage[prop])
const value = this.#storage[prop]
return value && JSON.parse(value)
}
}