about summary refs log tree commit diff
path: root/app/javascript/mastodon/actions/markers.js
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-09-16 20:17:40 +0200
committerGitHub <noreply@github.com>2020-09-16 20:17:40 +0200
commiteaea2311aaaf030e4a2f5d03be6131d0716fdaf7 (patch)
treed13cf7de2943f27366529b81cc0c1c93b130c5aa /app/javascript/mastodon/actions/markers.js
parentaab867b0e8119ecee78dabe8007f3c033e734b6d (diff)
Fix home TL marker code mishandling gaps (#14809)
Diffstat (limited to 'app/javascript/mastodon/actions/markers.js')
-rw-r--r--app/javascript/mastodon/actions/markers.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/actions/markers.js b/app/javascript/mastodon/actions/markers.js
index 37d1ddccf..6cb09fe96 100644
--- a/app/javascript/mastodon/actions/markers.js
+++ b/app/javascript/mastodon/actions/markers.js
@@ -57,7 +57,7 @@ export const synchronouslySubmitMarkers = () => (dispatch, getState) => {
 const _buildParams = (state) => {
   const params = {};
 
-  const lastHomeId         = state.getIn(['timelines', 'home', 'items', 0]);
+  const lastHomeId         = state.getIn(['timelines', 'home', 'items']).find(item => item !== null);
   const lastNotificationId = state.getIn(['notifications', 'items', 0, 'id']);
 
   if (lastHomeId && compareId(lastHomeId, state.getIn(['markers', 'home'])) > 0) {