From 5a9c8aeb424ee8991bd6b360637831a25d11f520 Mon Sep 17 00:00:00 2001 From: unarist Date: Thu, 29 Mar 2018 19:59:12 +0900 Subject: [PATCH] Fix TypeError on follow notification (#6950) `notification.status` may not be present, e.g. follow notification. --- app/javascript/mastodon/actions/notifications.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js index 7267b85bd0..da77afbe0e 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,