Skip to content

Commit

Permalink
fix: get notif from localStorage (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
ciniiia authored Sep 27, 2022
1 parent f08bbc1 commit 04950cf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 04950cf

Please sign in to comment.