Merge branch 'develop' of github.com:HabitRPG/habitrpg into joyclark-autocomplete_unit_tests

This commit is contained in:
Blade Barringer
2015-04-29 07:50:33 -05:00
69 changed files with 280 additions and 190 deletions

View File

@@ -221,13 +221,11 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
}
$scope.filterUser = function(msg) {
if ($scope.query === undefined || $scope.query === null) {
if (!$scope.query || !msg.user) {
return false;
}
if (msg.username == undefined) {
return false;
}
return msg.user.indexOf($scope.query.text) == 0; // query should be prefix of item.user
return msg.user.indexOf($scope.query.text) == 0;
}
$scope.addNewUser = function(user) {