fix: fix for when notification is undefined (#2093)

This commit is contained in:
Nolan Lawson 2021-11-13 10:57:36 -08:00 committed by GitHub
parent fdf4110dad
commit 0df4b724ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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