diff --git a/web/push-notif/notif-crypto-utils.js b/web/push-notif/notif-crypto-utils.js --- a/web/push-notif/notif-crypto-utils.js +++ b/web/push-notif/notif-crypto-utils.js @@ -1275,14 +1275,18 @@ } async function updateNotifsUnreadCountStorage(perKeyserverUnreadCount: { - +[keyserverID: string]: number, + +[keyserverID: string]: number | void, }) { - const unreadCountUpdatePromises: Array> = Object.entries( - perKeyserverUnreadCount, - ).map(([keyserverID, unreadCount]) => { - const keyserverUnreadCountKey = getKeyserverUnreadCountKey(keyserverID); - return localforage.setItem(keyserverUnreadCountKey, unreadCount); - }); + const unreadCountUpdatePromises: Array> = + Object.entries(perKeyserverUnreadCount).map( + ([keyserverID, unreadCount]) => { + const keyserverUnreadCountKey = getKeyserverUnreadCountKey(keyserverID); + return localforage.setItem( + keyserverUnreadCountKey, + unreadCount, + ); + }, + ); await Promise.all(unreadCountUpdatePromises); }