about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-10-31 00:55:20 +0100
committerGitHub <noreply@github.com>2018-10-31 00:55:20 +0100
commitb9d0d209cd16ef19b306528a9c4be34b47cf1945 (patch)
tree436d2c1ff286503cc0ab6f48a3be90295dcb2591
parentce2ee68b64c2ba2baa10378027efd0aadbe98598 (diff)
Fix reducer error when conversation has no last status in web UI (#9173)
Fix #9170
-rw-r--r--app/javascript/mastodon/reducers/conversations.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/reducers/conversations.js b/app/javascript/mastodon/reducers/conversations.js
index ea39fccee..b13a9fdf4 100644
--- a/app/javascript/mastodon/reducers/conversations.js
+++ b/app/javascript/mastodon/reducers/conversations.js
@@ -21,7 +21,7 @@ const conversationToMap = item => ImmutableMap({
   id: item.id,
   unread: item.unread,
   accounts: ImmutableList(item.accounts.map(a => a.id)),
-  last_status: item.last_status.id,
+  last_status: item.last_status ? item.last_status.id : null,
 });
 
 const updateConversation = (state, item) => state.update('items', list => {