Proper fix to the previous panic fix: put threads at the end when they should be there
parent
71e4b3d756
commit
99a28c0aae
|
@ -610,7 +610,9 @@ function preprocessFeed(feed: FeedItem[]): FeedItemWithThreadMeta[] {
|
||||||
let newIndex = reorg.findIndex(
|
let newIndex = reorg.findIndex(
|
||||||
item => new Date(item.indexedAt) < targetDate,
|
item => new Date(item.indexedAt) < targetDate,
|
||||||
)
|
)
|
||||||
if (newIndex === -1) newIndex = 0
|
if (newIndex === -1) {
|
||||||
|
newIndex = reorg.length
|
||||||
|
}
|
||||||
reorg.splice(newIndex, 0, ...removed)
|
reorg.splice(newIndex, 0, ...removed)
|
||||||
slice.index = newIndex
|
slice.index = newIndex
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue