Fix bug with numeric sorts of textual values

sort-optimisations
jeremy@jermolene.com 2021-09-20 11:10:26 +01:00
rodzic 0846026bc8
commit 74dbe5cf21
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -396,7 +396,7 @@ exports.sortTiddlers = function(titles,sortField,isDescending,isCaseSensitive,is
y = Number(b);
if(isNaN(x)) {
if(isNaN(y)) {
return 0;
// If neither value is a number then fall through to a textual comparison
} else {
return isDescending ? -1 : 1;
}
@ -440,7 +440,7 @@ exports.sortTiddlers = function(titles,sortField,isDescending,isCaseSensitive,is
y = Number(b);
if(isNaN(x)) {
if(isNaN(y)) {
return 0;
// If neither value is a number then fall through to a textual comparison
} else {
return isDescending ? -1 : 1;
}