mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-01-05 16:51:36 -08:00
Fix problem with sortTiddlers
This commit is contained in:
parent
8d4be5934b
commit
3a710ad9ce
1 changed files with 6 additions and 2 deletions
|
|
@ -256,8 +256,12 @@ exports.sortTiddlers = function(titles,sortField,isDescending,isCaseSensitive) {
|
|||
b = self.getTiddler(b).fields[sortField] || "";
|
||||
}
|
||||
if(!isCaseSensitive) {
|
||||
a = a.toLowerCase();
|
||||
b = b.toLowerCase();
|
||||
if(typeof a === "string") {
|
||||
a = a.toLowerCase();
|
||||
}
|
||||
if(typeof b === "string") {
|
||||
b = b.toLowerCase();
|
||||
}
|
||||
}
|
||||
if(a < b) {
|
||||
return isDescending ? +1 : -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue