Skip to content

Commit ca97012

Browse files
committed
Remove check for !angular.equals
Since this code is in a watchCollection, we know that the tracker needs to be reset. Using angular.equals means that you can't swap out the original promise with a new promise; the new promise will not get detected as "different" by angular.equals.
1 parent 55755a9 commit ca97012

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

angular-busy.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,12 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
158158

159159
templateScope.$message = options.message;
160160

161-
if (!angular.equals(tracker.promises,options.promise)) {
162-
tracker.reset({
163-
promises:options.promise,
164-
delay:options.delay,
165-
minDuration: options.minDuration
166-
});
167-
}
168-
161+
tracker.reset({
162+
promises:options.promise,
163+
delay:options.delay,
164+
minDuration: options.minDuration
165+
});
166+
169167
templateScope.$cgBusyIsActive = function() {
170168
return tracker.active();
171169
};

0 commit comments

Comments
 (0)