From 9f914824cb7713c55b6563f31b510fc83e4c1e4d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 25 Jan 2019 17:55:56 +0300 Subject: [PATCH] i should take it easy --- src/components/conversation/conversation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index 0ecbaddc..c18781de 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -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 } }