From 951bc09ab5ce09d5c62ad46593bc70e9222d771b Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Thu, 31 Mar 2016 11:34:27 +0200 Subject: [PATCH] Fix --- js/components/contactList/contactList_controller.js | 2 +- js/filters/contactGroup_filter.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/components/contactList/contactList_controller.js b/js/components/contactList/contactList_controller.js index 8441a74b7..1b3877907 100644 --- a/js/components/contactList/contactList_controller.js +++ b/js/components/contactList/contactList_controller.js @@ -77,7 +77,7 @@ angular.module('contactsApp') var unbindListWatch = $scope.$watch('ctrl.contactList', function() { if(ctrl.contactList && ctrl.contactList.length > 0) { // Check if a specific uid is requested - if($routeParams.uid) { + if($routeParams.uid && $routeParams.gid) { ctrl.contactList.forEach(function(contact) { if(contact.uid() === $routeParams.uid) { ctrl.setSelectedId($routeParams.uid); diff --git a/js/filters/contactGroup_filter.js b/js/filters/contactGroup_filter.js index 3ceb1ca1e..ab42434bc 100644 --- a/js/filters/contactGroup_filter.js +++ b/js/filters/contactGroup_filter.js @@ -22,6 +22,10 @@ angular.module('contactsApp') } } } - return filter; + if(filter.length==0) { + return contacts; + } else { + return filter; + } }; });