Fixed error in users.js if required actions is null (for example when creating new user)

This commit is contained in:
Stian Thorgersen 2013-11-23 09:56:27 +00:00
parent 846c094ba2
commit cecaf8c96a

View file

@ -155,7 +155,7 @@ module.controller('UserDetailCtrl', function($scope, realm, user, User, $locatio
for (var i = 0; i < userReqActionList.length; i++){
var action = userReqActionList[i];
if ($scope.user.requiredActions.indexOf(action.id) > -1){
if ($scope.user.requiredActions && $scope.user.requiredActions.indexOf(action.id) > -1){
$scope.userActions.push({id: action.id, text: action.text});
}
}