aboutsummaryrefslogtreecommitdiffstats
path: root/alias-angular/app/js/controllers.js
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2012-04-20 10:40:54 -0400
committerGuillaume Horel <guillaume.horel@gmail.com>2012-04-20 10:41:47 -0400
commite6f2a945a4fb0b3c44f6e6876f511400ca7ee8bc (patch)
tree94c55eccb63ad8ed5ebf38f9f948289889e20c77 /alias-angular/app/js/controllers.js
parent4fee964dee221987ccfa53791f1730ffb89cec12 (diff)
downloadalias-e6f2a945a4fb0b3c44f6e6876f511400ca7ee8bc.tar.gz
Fix the roster filters
Diffstat (limited to 'alias-angular/app/js/controllers.js')
-rw-r--r--alias-angular/app/js/controllers.js5
1 files changed, 2 insertions, 3 deletions
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'];
-