From 9a6ee9d2ef2d853b623d386c928088356ba4dbce Mon Sep 17 00:00:00 2001 From: David Dreher Date: Wed, 8 May 2019 06:37:34 +0200 Subject: [PATCH] change return handling of sortByAlphabetical --- browser/main/NoteList/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js index c12b9977..41d09885 100644 --- a/browser/main/NoteList/index.js +++ b/browser/main/NoteList/index.js @@ -41,8 +41,9 @@ function sortByAlphabetical (a, b) { const floatA = parseFloat(matchA[1]) const floatB = parseFloat(matchB[1]) - if (Math.abs(floatA - floatB) > 0.01) { - return floatA - floatB + const diff = floatA - floatB + if (diff !== 0) { + return diff } // The float values are equal. We will compare the full title.