diff --git a/app/assets/javascripts/app/services/modelManager.js b/app/assets/javascripts/app/services/modelManager.js index 325f9f1ef..7ddf1d3b7 100644 --- a/app/assets/javascripts/app/services/modelManager.js +++ b/app/assets/javascripts/app/services/modelManager.js @@ -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})) {