mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +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 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.
|
||||
|
||||
Reference in New Issue
Block a user