JS scoping sucks sometimes

This commit is contained in:
Joseph Schorr 2015-04-21 16:21:26 -04:00
parent afa59da8d6
commit 70d5200858

View file

@ -35,9 +35,11 @@ angular.module('quay').directive('teamsManager', function () {
if (!$scope.organization.teams.hasOwnProperty(name) || $scope.members[name]) { continue; }
// Load fully async to prevent it from blocking the UI.
$timeout(function() {
loadMembersOfTeam(name);
}, 1);
(function(teamname) {
$timeout(function() {
loadMembersOfTeam(teamname);
}, 1);
})(name);
}
};