about summary refs log tree commit diff
path: root/app/javascript/flavours
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-05-27 19:34:08 +0200
committerThibG <thib@sitedethib.com>2018-05-29 21:25:28 +0200
commit15bef77adda8b146f27d9b6da0a5d18a39add983 (patch)
tree44fc278ea818abd49ac5b2898736ae580c4bf7fb /app/javascript/flavours
parent4b38ac3bed78dfbd5159af37674c18a7ea5e69d5 (diff)
[Glitch] Fix ID duplication in timelines
Port 306267dbd275363422f9288c91e634a92511620c to glitch-soc
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r--app/javascript/flavours/glitch/reducers/timelines.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/reducers/timelines.js b/app/javascript/flavours/glitch/reducers/timelines.js
index 3a546791a..178d60af2 100644
--- a/app/javascript/flavours/glitch/reducers/timelines.js
+++ b/app/javascript/flavours/glitch/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));