From 04950cf048c16cdbe3d002802a40795137f34017 Mon Sep 17 00:00:00 2001 From: ciniiia Date: Tue, 27 Sep 2022 10:19:53 +0700 Subject: [PATCH] fix: get notif from localStorage (#521) --- src/lib/notification.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/notification.js b/src/lib/notification.js index cee36a90..b9a69445 100644 --- a/src/lib/notification.js +++ b/src/lib/notification.js @@ -21,10 +21,9 @@ export async function getUnlistedNotification (roles, newBlock, lastBlock) { let listNotification = [] const listNotificationJson = localStorage.getLocalStorageByName(storageName); - if (!listNotificationJson) return - - listNotification = JSON.parse(listNotificationJson) - + if (listNotificationJson) { + listNotification = JSON.parse(listNotificationJson) + } if(lastBlock >= parseInt(data[data.length-1].block_number)) return