sort by lowercase

This commit is contained in:
Foster Hoff
2017-01-18 13:46:09 -08:00
parent c258f18667
commit a8198c1643

View File

@@ -117,7 +117,10 @@ class ModelManager {
items.forEach(function(item){
if(item.content_type == "Tag") {
if(!_.find(this.tags, {uuid: item.uuid})) {
this.tags.splice(_.sortedIndexBy(this.tags, item, 'title'), 0, item);
this.tags.splice(_.sortedIndexBy(this.tags, item, function(item){
if (item.title) return item.title.toLowerCase();
else return ''
}), 0, item);
}
} else if(item.content_type == "Note") {
if(!_.find(this.notes, {uuid: item.uuid})) {