about summary refs log tree commit diff
path: root/app/assets/javascripts/components/reducers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-26 23:06:27 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-26 23:06:27 +0100
commit4fbdf100c4a942100f6542bbb858d91673af8573 (patch)
tree60aa15666490ed1d3b79e2b94a6f43c90b3d619f /app/assets/javascripts/components/reducers
parent4bb8ff7c8ea3ab7c291a23893af2846811b99faf (diff)
Add <MissingIndicator /> when status or account are not found, skip alerts
for those errors
Diffstat (limited to 'app/assets/javascripts/components/reducers')
-rw-r--r--app/assets/javascripts/components/reducers/statuses.jsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/assets/javascripts/components/reducers/statuses.jsx b/app/assets/javascripts/components/reducers/statuses.jsx
index 6323e0fbe..ce791eab6 100644
--- a/app/assets/javascripts/components/reducers/statuses.jsx
+++ b/app/assets/javascripts/components/reducers/statuses.jsx
@@ -39,14 +39,15 @@ const normalizeStatus = (state, status) => {
     return state;
   }
 
-  status.account = status.account.id;
+  const normalStatus   = { ...status };
+  normalStatus.account = status.account.id;
 
   if (status.reblog && status.reblog.id) {
-    state         = normalizeStatus(state, status.reblog);
-    status.reblog = status.reblog.id;
+    state               = normalizeStatus(state, status.reblog);
+    normalStatus.reblog = status.reblog.id;
   }
 
-  return state.update(status.id, Immutable.Map(), map => map.mergeDeep(Immutable.fromJS(status)));
+  return state.update(status.id, Immutable.Map(), map => map.mergeDeep(Immutable.fromJS(normalStatus)));
 };
 
 const normalizeStatuses = (state, statuses) => {