aboutsummaryrefslogtreecommitdiffstats
path: root/alias-angular/app/js/controllers.js
diff options
context:
space:
mode:
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'];
-