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<*> => {
|
||||
try {
|
||||
const serializedState = await storage.get(key)
|
||||
if (serializedState === null) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
if (serializedState === undefined) {
|
||||
if (serializedState === null || serializedState === undefined) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue