about summary refs log tree commit diff
path: root/app/assets
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-18 01:11:00 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-18 01:11:00 +0200
commitfdd30af59510dbc5ffaabd2f262b9a993b6896c5 (patch)
tree58f53aceebb01c7667ae1be7021febd8f8320594 /app/assets
parent6611e3a2efbae27585f0153211b6f5cc80ba9fc7 (diff)
Will this fix the issue?
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/components/components/status.jsx2
-rw-r--r--app/assets/javascripts/components/selectors/index.jsx11
2 files changed, 8 insertions, 5 deletions
diff --git a/app/assets/javascripts/components/components/status.jsx b/app/assets/javascripts/components/components/status.jsx
index 543759113..d3acff3f0 100644
--- a/app/assets/javascripts/components/components/status.jsx
+++ b/app/assets/javascripts/components/components/status.jsx
@@ -45,8 +45,6 @@ const Status = React.createClass({
 
     var { status, ...other } = this.props;
 
-    console.log(status, this.props);
-
     if (status.get('reblog') !== null) {
       let displayName = status.getIn(['account', 'display_name']);
 
diff --git a/app/assets/javascripts/components/selectors/index.jsx b/app/assets/javascripts/components/selectors/index.jsx
index c3c007f28..91f900f90 100644
--- a/app/assets/javascripts/components/selectors/index.jsx
+++ b/app/assets/javascripts/components/selectors/index.jsx
@@ -29,15 +29,20 @@ const getAccountTimelineIds = (state, id) => state.getIn(['timelines', 'accounts
 
 const assembleStatus = (id, statuses, accounts) => {
   let status = statuses.get(id, null);
+  let reblog = null;
 
   if (status === null) {
     return null;
   }
 
-  let reblog = statuses.get(status.get('reblog'), null);
+  if (status.get('reblog', null) !== null) {
+    reblog = statuses.get(status.get('reblog'), null);
 
-  if (reblog !== null) {
-    reblog = reblog.set('account', accounts.get(reblog.get('account')));
+    if (reblog !== null) {
+      reblog = reblog.set('account', accounts.get(reblog.get('account')));
+    } else {
+      return null;
+    }
   }
 
   return status.set('reblog', reblog).set('account', accounts.get(status.get('account')));