Fix NPE in user service
This commit is contained in:
parent
580bb152fe
commit
278c28f350
1 changed files with 8 additions and 6 deletions
|
@ -1587,12 +1587,14 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
|
||||||
|
|
||||||
$scope.cuser = jQuery.extend({}, user);
|
$scope.cuser = jQuery.extend({}, user);
|
||||||
|
|
||||||
for (var i = 0; i < $scope.cuser.logins.length; i++) {
|
if ($scope.cuser.logins) {
|
||||||
if ($scope.cuser.logins[i].service == 'github') {
|
for (var i = 0; i < $scope.cuser.logins.length; i++) {
|
||||||
var githubId = $scope.cuser.logins[i].service_identifier;
|
if ($scope.cuser.logins[i].service == 'github') {
|
||||||
$http.get('https://api.github.com/user/' + githubId).success(function(resp) {
|
var githubId = $scope.cuser.logins[i].service_identifier;
|
||||||
$scope.githubLogin = resp.login;
|
$http.get('https://api.github.com/user/' + githubId).success(function(resp) {
|
||||||
});
|
$scope.githubLogin = resp.login;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue