fix load function for storage

This commit is contained in:
Mikhail Mikheev 2019-04-01 18:02:27 +04:00
parent 1c0917d25a
commit 76bf32ec16
1 changed files with 1 additions and 5 deletions

View File

@ -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
} }