Sfoglia il codice sorgente

Fix TypeError on follow notification (#6950)

`notification.status` may not be present, e.g. follow notification.
master
unarist 6 anni fa
committed by Eugen Rochko
parent
commit
41452e8302
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. +3
    -1
      app/javascript/mastodon/actions/notifications.js

+ 3
- 1
app/javascript/mastodon/actions/notifications.js Vedi File

@@ -43,7 +43,9 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
const playSound = getState().getIn(['settings', 'notifications', 'sounds', notification.type], true); const playSound = getState().getIn(['settings', 'notifications', 'sounds', notification.type], true);


dispatch(importFetchedAccount(notification.account)); dispatch(importFetchedAccount(notification.account));
dispatch(importFetchedStatus(notification.status));
if (notification.status) {
dispatch(importFetchedStatus(notification.status));
}


dispatch({ dispatch({
type: NOTIFICATIONS_UPDATE, type: NOTIFICATIONS_UPDATE,


Caricamento…
Annulla
Salva