about summary refs log tree commit diff
path: root/app/javascript/mastodon/actions/notifications.js
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2018-03-29 19:59:12 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-03-29 12:59:12 +0200
commit41452e83028148b3ef6e5888e9bd3b16fd608ec7 (patch)
tree19f8bb6d42ed6c6abb6a5a98a262dd3c5c60424f /app/javascript/mastodon/actions/notifications.js
parent9ed5eebd7ce8381af77dd2918678202a0776af4a (diff)
Fix TypeError on follow notification (#6950)
`notification.status` may not be present, e.g. follow notification.
Diffstat (limited to 'app/javascript/mastodon/actions/notifications.js')
-rw-r--r--app/javascript/mastodon/actions/notifications.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js
index 7267b85bd..da77afbe0 100644
--- a/app/javascript/mastodon/actions/notifications.js
+++ b/app/javascript/mastodon/actions/notifications.js
@@ -43,7 +43,9 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
     const playSound = getState().getIn(['settings', 'notifications', 'sounds', notification.type], true);
 
     dispatch(importFetchedAccount(notification.account));
-    dispatch(importFetchedStatus(notification.status));
+    if (notification.status) {
+      dispatch(importFetchedStatus(notification.status));
+    }
 
     dispatch({
       type: NOTIFICATIONS_UPDATE,