Remove duplicate from document title autocomplete

This commit is contained in:
jendib 2013-08-03 00:07:56 +02:00
parent 05683ef81e
commit 9fca036edb

View File

@ -26,7 +26,7 @@ App.controller('DocumentEdit', function($scope, $q, $http, $state, $stateParams,
asc: true,
search: $viewValue
}).then(function(data) {
deferred.resolve(_.pluck(data.documents, 'title'));
deferred.resolve(_.uniq(_.pluck(data.documents, 'title'), true));
});
return deferred.promise;
};