Fix NPE in user service

This commit is contained in:
Joseph Schorr 2014-05-08 19:09:43 -04:00
parent 580bb152fe
commit 278c28f350

View file

@ -1587,6 +1587,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
$scope.cuser = jQuery.extend({}, user); $scope.cuser = jQuery.extend({}, user);
if ($scope.cuser.logins) {
for (var i = 0; i < $scope.cuser.logins.length; i++) { for (var i = 0; i < $scope.cuser.logins.length; i++) {
if ($scope.cuser.logins[i].service == 'github') { if ($scope.cuser.logins[i].service == 'github') {
var githubId = $scope.cuser.logins[i].service_identifier; var githubId = $scope.cuser.logins[i].service_identifier;
@ -1595,6 +1596,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
}); });
} }
} }
}
}); });
$scope.readyForPlan = function() { $scope.readyForPlan = function() {