]> cat aescling's git repositories - mastodon.git/commitdiff
Fix second report (regression from 3b81baaaaf51ff1c70fb1f865eef07fdb33a5950) (#4863)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Sat, 9 Sep 2017 11:42:48 +0000 (20:42 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 9 Sep 2017 11:42:48 +0000 (13:42 +0200)
app/javascript/mastodon/reducers/reports.js

index 283c5b6f5e3340942711829bd8c6653d4890d2ef..a08bbec387dbdb00cff5b6dadee596994012e5cf 100644 (file)
@@ -28,7 +28,7 @@ export default function reports(state = initialState, action) {
       if (state.getIn(['new', 'account_id']) !== action.account.get('id')) {
         map.setIn(['new', 'status_ids'], action.status ? ImmutableSet([action.status.getIn(['reblog', 'id'], action.status.get('id'))]) : ImmutableSet());
         map.setIn(['new', 'comment'], '');
-      } else {
+      } else if (action.status) {
         map.updateIn(['new', 'status_ids'], ImmutableSet(), set => set.add(action.status.getIn(['reblog', 'id'], action.status.get('id'))));
       }
     });