Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit a4904c0

Browse files
pr4v33nrodyhaddad
authored andcommitted
fix($interval): when canceling, use clearInterval from $window instead of global scope.
In $interval.cancel, use clearInterval from the $window service instead of from global scope. The variable clearInterval declared above isn't visible here.
1 parent d3c191e commit a4904c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/interval.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function $IntervalProvider() {
174174
interval.cancel = function(promise) {
175175
if (promise && promise.$$intervalId in intervals) {
176176
intervals[promise.$$intervalId].reject('canceled');
177-
clearInterval(promise.$$intervalId);
177+
$window.clearInterval(promise.$$intervalId);
178178
delete intervals[promise.$$intervalId];
179179
return true;
180180
}

0 commit comments

Comments
 (0)