Fix race condition in the plan manager

This commit is contained in:
Joseph Schorr 2013-11-06 19:19:21 -05:00
parent 56f777448a
commit ce91190a7e

View file

@ -621,17 +621,8 @@ quayApp.directive('planManager', function () {
$scope.planLoading = true;
loadPlans();
$scope.$watch('organization', function(organization) {
if ($scope.organization != organization && !$scope.user) {
loadPlans();
}
});
$scope.$watch('user', function(user) {
if ($scope.user != user && !$scope.organization) {
loadPlans();
}
});
$scope.$watch('organization', loadPlans);
$scope.$watch('user', loadPlans);
}
};
return directiveDefinitionObject;