Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/app/subscription/directive/subscribe.js b/src/app/subscription/directive/subscribe.js
- index 09b3655..010fbb3 100644
- --- a/src/app/subscription/directive/subscribe.js
- +++ b/src/app/subscription/directive/subscribe.js
- @@ -176,10 +176,6 @@ angular.module('sb.util').directive('subscribe',
- }
- };
- - $scope.subscriptions = $scope.subscriptions;
- -
- - var i;
- -
- /** Set subscriptions based on list passed from
- * stories/projects/project_groups controller(s)
- */
- @@ -194,12 +190,13 @@ angular.module('sb.util').directive('subscribe',
- cuPromise.then(
- function () {
- - for (i in $scope.subscriptions){
- - if ($scope.resourceId ===
- - $scope.subscriptions[i].target_id) {
- - setSubscription($scope.subscriptions[i]);
- + angular.forEach($scope.subscriptions,
- + function(sub) {
- + if ($scope.resourceId === sub.target_id) {
- + setSubscription(sub);
- + }
- }
- - }
- + );
- $scope.resolving = false;
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement