fix load function for storage
This commit is contained in:
parent
1c0917d25a
commit
76bf32ec16
|
@ -9,11 +9,7 @@ export const storage = new ImmortalStorage(stores)
|
||||||
export const load = async (key: string): Promise<*> => {
|
export const load = async (key: string): Promise<*> => {
|
||||||
try {
|
try {
|
||||||
const serializedState = await storage.get(key)
|
const serializedState = await storage.get(key)
|
||||||
if (serializedState === null) {
|
if (serializedState === null || serializedState === undefined) {
|
||||||
return undefined
|
|
||||||
}
|
|
||||||
|
|
||||||
if (serializedState === undefined) {
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue