changed FilteredList.setFilter unique matches computing

This commit is contained in:
Marek Rusinowski 2014-09-10 12:35:04 +02:00
commit c0c99ad5c6

View file

@ -345,7 +345,7 @@ var FilteredList = function(array, filterText, mutateData) {
// make unique // make unique
var prev = null; var prev = null;
matches = matches.filter(function(item){ matches = matches.filter(function(item){
var caption = item.value || item.caption || item.snippet; var caption = item.snippet || item.caption || item.value;
if (caption === prev) return false; if (caption === prev) return false;
prev = caption; prev = caption;
return true; return true;