fix: fix for when notification is undefined

This commit is contained in:
Nolan Lawson 2021-11-13 10:29:56 -08:00
parent 54b3042042
commit 481ac744fc
1 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,9 @@ export function fetchNotification (notificationsStore, statusesStore, accountsSt
notificationsStore.get(id).onsuccess = e => {
const notification = e.target.result
callback(notification)
if (!notification) {
return
}
fetchAccount(accountsStore, notification[ACCOUNT_ID], account => {
notification.account = account
})