forked from AkkomaGang/akkoma-fe
i should take it easy
This commit is contained in:
parent
a733a33d36
commit
9f914824cb
1 changed files with 2 additions and 2 deletions
|
@ -7,13 +7,13 @@ const sortById = (a, b) => {
|
||||||
const isSeqA = !Number.isNaN(seqA)
|
const isSeqA = !Number.isNaN(seqA)
|
||||||
const isSeqB = !Number.isNaN(seqB)
|
const isSeqB = !Number.isNaN(seqB)
|
||||||
if (isSeqA && isSeqB) {
|
if (isSeqA && isSeqB) {
|
||||||
return seqA > seqB ? -1 : 1
|
return seqA < seqB ? -1 : 1
|
||||||
} else if (isSeqA && !isSeqB) {
|
} else if (isSeqA && !isSeqB) {
|
||||||
return 1
|
return 1
|
||||||
} else if (!isSeqA && isSeqB) {
|
} else if (!isSeqA && isSeqB) {
|
||||||
return -1
|
return -1
|
||||||
} else {
|
} else {
|
||||||
return a.id > b.id ? -1 : 1
|
return a.id < b.id ? -1 : 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue