about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2018-04-24 18:47:27 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-04-24 11:47:27 +0200
commit306267dbd275363422f9288c91e634a92511620c (patch)
tree63eccb643881b35c3541a40a923cf538512e68ac /app/javascript
parent60b871d56c554ddb22b7890d803e4ba6650ed286 (diff)
Fix ID duplication in timelines (#7251)
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/reducers/timelines.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/reducers/timelines.js b/app/javascript/mastodon/reducers/timelines.js
index ad897bcc9..dd675d78f 100644
--- a/app/javascript/mastodon/reducers/timelines.js
+++ b/app/javascript/mastodon/reducers/timelines.js
@@ -34,7 +34,7 @@ const expandNormalizedTimeline = (state, timeline, statuses, next, isPartial) =>
       mMap.update('items', ImmutableList(), oldIds => {
         const newIds = statuses.map(status => status.get('id'));
         const lastIndex = oldIds.findLastIndex(id => id !== null && compareId(id, newIds.last()) >= 0) + 1;
-        const firstIndex = oldIds.take(lastIndex).findLastIndex(id => id !== null && compareId(id, newIds.first()) >= 0);
+        const firstIndex = oldIds.take(lastIndex).findLastIndex(id => id !== null && compareId(id, newIds.first()) > 0);
 
         if (firstIndex < 0) {
           return (isPartial ? newIds.unshift(null) : newIds).concat(oldIds.skip(lastIndex));