Skip to content

Commit 9a6ee9d

Browse files
dredavRokt33r
authored andcommitted
change return handling of sortByAlphabetical
1 parent 2cbbe7a commit 9a6ee9d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

browser/main/NoteList/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ function sortByAlphabetical (a, b) {
4141
const floatA = parseFloat(matchA[1])
4242
const floatB = parseFloat(matchB[1])
4343

44-
if (Math.abs(floatA - floatB) > 0.01) {
45-
return floatA - floatB
44+
const diff = floatA - floatB
45+
if (diff !== 0) {
46+
return diff
4647
}
4748

4849
// The float values are equal. We will compare the full title.

0 commit comments

Comments
 (0)