mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Check if the float is quals (abs value is greather 0.01) and return the sub value when not.
This commit is contained in:
committed by
Junyoung Choi
parent
19fc1fd674
commit
2cbbe7aeda
@@ -41,10 +41,8 @@ function sortByAlphabetical (a, b) {
|
||||
const floatA = parseFloat(matchA[1])
|
||||
const floatB = parseFloat(matchB[1])
|
||||
|
||||
if (floatA < floatB) {
|
||||
return -1
|
||||
} else if (floatA > floatB) {
|
||||
return 1
|
||||
if (Math.abs(floatA - floatB) > 0.01) {
|
||||
return floatA - floatB
|
||||
}
|
||||
|
||||
// The float values are equal. We will compare the full title.
|
||||
|
||||
Reference in New Issue
Block a user