From e2bf0bcc62150b4b256730c4087ec4775919ddc0 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Betancourt Date: Wed, 3 Sep 2014 00:54:17 -0500 Subject: [PATCH] Update angular-filter.js Support for object keys with spaces in the unique filter --- dist/angular-filter.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dist/angular-filter.js b/dist/angular-filter.js index 3e8a68d..5549b84 100644 --- a/dist/angular-filter.js +++ b/dist/angular-filter.js @@ -1058,11 +1058,10 @@ function uniqFilter($parse) { }) } //store all unique members - var uniqueItems = [], - get = $parse(property); + var uniqueItems = []; return collection.filter(function (elm) { - var prop = get(elm); + var prop = elm[property]; if(some(uniqueItems, prop)) { return false; } @@ -1765,4 +1764,4 @@ angular.module('angular.filter', [ 'a8m.filter-watcher' ]); -})( window, window.angular ); \ No newline at end of file +})( window, window.angular );