fix sorting.

This commit is contained in:
fiatjaf 2022-01-03 09:10:01 -03:00
parent 176554cddd
commit 171e8b3530
2 changed files with 2 additions and 2 deletions

View File

@ -253,7 +253,7 @@ export default {
if (event.created_at < this.ancestors[i].created_at) {
// the new event is older than the current index,
// so we add it at the previous index
this.ancestors.splice(i - 1, 0, event)
this.ancestors.splice(i, 0, event)
return
}
}

View File

@ -201,7 +201,7 @@ export default {
if (event.created_at > this.events[i].created_at) {
// the new event is newer than the current index,
// so we add it at the previous index
this.events.splice(i - 1, 0, event)
this.events.splice(i, 0, event)
return
}
}