From e8b48c8ed6bb2300e1e22dcaf72094c187470e1e Mon Sep 17 00:00:00 2001 From: maciejhirsz Date: Fri, 13 Jul 2018 23:30:19 +0200 Subject: [PATCH] Fix node sorting --- packages/frontend/src/components/Chain.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/Chain.tsx b/packages/frontend/src/components/Chain.tsx index 5f661cb..9158ee4 100644 --- a/packages/frontend/src/components/Chain.tsx +++ b/packages/frontend/src/components/Chain.tsx @@ -25,7 +25,7 @@ function sortNodes(a: Node.Props, b: Node.Props): number { const aPropagation = a.blockDetails[4] == null ? Infinity : a.blockDetails[4] as number; const bPropagation = b.blockDetails[4] == null ? Infinity : b.blockDetails[4] as number; - if (aPropagation === bPropagation) { + if (aPropagation === Infinity && bPropagation === Infinity) { // Descending sort by block number return b.blockDetails[0] - a.blockDetails[0]; }