also compare by key if the timestamps are the same
This commit is contained in:
parent
757e08c62c
commit
1d9709d4e3
1 changed files with 6 additions and 1 deletions
|
@ -135,7 +135,12 @@ class ReactionViewModel {
|
||||||
const a = this._annotation;
|
const a = this._annotation;
|
||||||
const b = other._annotation;
|
const b = other._annotation;
|
||||||
if (a && b) {
|
if (a && b) {
|
||||||
return a.firstTimestamp - b.firstTimestamp;
|
const cmp = a.firstTimestamp - b.firstTimestamp;
|
||||||
|
if (cmp === 0) {
|
||||||
|
return this.key < other.key ? -1 : 1;
|
||||||
|
} else {
|
||||||
|
return cmp;
|
||||||
|
}
|
||||||
} else if (a) {
|
} else if (a) {
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
|
|
Reference in a new issue