Fixing #5706 filtering system messages results in errors.

This commit is contained in:
Joy Clark
2015-04-27 23:01:15 +02:00
parent df91592438
commit df1c349ea7
2 changed files with 16 additions and 8 deletions

View File

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