From e6f2a945a4fb0b3c44f6e6876f511400ca7ee8bc Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Fri, 20 Apr 2012 10:40:54 -0400 Subject: Fix the roster filters --- alias-angular/app/js/controllers.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'alias-angular/app/js/controllers.js') diff --git a/alias-angular/app/js/controllers.js b/alias-angular/app/js/controllers.js index 144592a..1eb53e7 100644 --- a/alias-angular/app/js/controllers.js +++ b/alias-angular/app/js/controllers.js @@ -35,7 +35,7 @@ function ConnectCtl($scope, StropheSrv, $log, $rootScope) { } ConnectCtl.$inject = ['$scope', 'StropheSrv', '$log', '$rootScope']; - + function RosterCtl($scope, StropheSrv, $log) { $scope.contacts = {}; $scope.get_contacts = function() { @@ -46,7 +46,7 @@ function RosterCtl($scope, StropheSrv, $log) { var query = elems[0]; Strophe.forEachChild(query, 'item', function(item){ var jid = item.getAttribute('jid'); - var name = item.getAttribute('name'); + var name = item.getAttribute('name')||''; //contacts are offline by default $scope.contacts[jid] = {jid: jid, name: name, status: 'offline'}; }); @@ -89,4 +89,3 @@ function RosterCtl($scope, StropheSrv, $log) { } RosterCtl.$inject = ['$scope','StropheSrv','$log']; - -- cgit v1.2.3-70-g09d2