about summary refs log tree commit diff
path: root/app/assets/javascripts/components/actions/timelines.jsx
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-16 13:27:58 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-16 13:28:25 +0100
commit7d53ee73f323b04757a78e83dcbe49c872d481eb (patch)
tree5a5ba68d74ca96a97cce6a4cd054f42f28f86b49 /app/assets/javascripts/components/actions/timelines.jsx
parentda5d3662305b3d28af9e88a7168f3a1702351a9a (diff)
Fix #238 - Add "favourites" column
Diffstat (limited to 'app/assets/javascripts/components/actions/timelines.jsx')
-rw-r--r--app/assets/javascripts/components/actions/timelines.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/components/actions/timelines.jsx b/app/assets/javascripts/components/actions/timelines.jsx
index 8bb939d31..975a0e090 100644
--- a/app/assets/javascripts/components/actions/timelines.jsx
+++ b/app/assets/javascripts/components/actions/timelines.jsx
@@ -97,6 +97,11 @@ export function expandTimeline(timeline, id = null) {
   return (dispatch, getState) => {
     const lastId = getState().getIn(['timelines', timeline, 'items'], Immutable.List()).last();
 
+    if (!lastId) {
+      // If timeline is empty, don't try to load older posts since there are none
+      return;
+    }
+
     dispatch(expandTimelineRequest(timeline));
 
     let path = timeline;