kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fix bug with numeric sorts of textual values
rodzic
0846026bc8
commit
74dbe5cf21
|
@ -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;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue