mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
return null if not exist table
This commit is contained in:
parent
1342c76261
commit
93612ce956
@ -12,6 +12,10 @@ export default class StoragedState {
|
|||||||
getState = async (stateKey) => {
|
getState = async (stateKey) => {
|
||||||
const data = await this.db.table("states").get(stateKey)
|
const data = await this.db.table("states").get(stateKey)
|
||||||
|
|
||||||
|
if (!data) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
return data.value
|
return data.value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user