From 76bf32ec167ee381837c7e5b296db6123298173c Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 1 Apr 2019 18:02:27 +0400 Subject: [PATCH] fix load function for storage --- src/utils/storage/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/utils/storage/index.js b/src/utils/storage/index.js index 8feff3bd..815ffbeb 100644 --- a/src/utils/storage/index.js +++ b/src/utils/storage/index.js @@ -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 }