mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-17 19:51:42 +00:00
change return handling of sortByAlphabetical
This commit is contained in:
committed by
Junyoung Choi
parent
2cbbe7aeda
commit
9a6ee9d2ef
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user