1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-24 07:56:52 +00:00

Fix problem with sortTiddlers

This commit is contained in:
Jeremy Ruston 2012-10-23 16:28:38 +01:00
parent 8d4be5934b
commit 3a710ad9ce

View File

@ -256,9 +256,13 @@ exports.sortTiddlers = function(titles,sortField,isDescending,isCaseSensitive) {
b = self.getTiddler(b).fields[sortField] || "";
}
if(!isCaseSensitive) {
if(typeof a === "string") {
a = a.toLowerCase();
}
if(typeof b === "string") {
b = b.toLowerCase();
}
}
if(a < b) {
return isDescending ? +1 : -1;
} else {