1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-18 12:11:43 +00:00

change return handling of sortByAlphabetical

This commit is contained in:
David Dreher
2019-05-08 06:37:34 +02:00
committed by Junyoung Choi
parent 2cbbe7aeda
commit 9a6ee9d2ef

View File

@@ -41,8 +41,9 @@ function sortByAlphabetical (a, b) {
const floatA = parseFloat(matchA[1]) const floatA = parseFloat(matchA[1])
const floatB = parseFloat(matchB[1]) const floatB = parseFloat(matchB[1])
if (Math.abs(floatA - floatB) > 0.01) { const diff = floatA - floatB
return floatA - floatB if (diff !== 0) {
return diff
} }
// The float values are equal. We will compare the full title. // The float values are equal. We will compare the full title.