i should take it easy

This commit is contained in:
Henry Jameson 2019-01-25 17:55:56 +03:00
parent a733a33d36
commit 9f914824cb

View file

@ -7,13 +7,13 @@ const sortById = (a, b) => {
const isSeqA = !Number.isNaN(seqA)
const isSeqB = !Number.isNaN(seqB)
if (isSeqA && isSeqB) {
return seqA > seqB ? -1 : 1
return seqA < seqB ? -1 : 1
} else if (isSeqA && !isSeqB) {
return 1
} else if (!isSeqA && isSeqB) {
return -1
} else {
return a.id > b.id ? -1 : 1
return a.id < b.id ? -1 : 1
}
}