mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-06-18 03:58:15 +08:00
fix(ngMock.$interval): should use angular.isDefined
The newly introduced `$interval` mock service for ngMock calls `isDefined` in the global namespace which fails when used within unit tests. This change adds the missing `angular.` prefix to such `isDefined` calls. Closes #4334 Closes #4353
This commit is contained in:
committed by
Pete Bacon Darwin
parent
1366556ace
commit
9bbd62f454
4
src/ngMock/angular-mocks.js
vendored
4
src/ngMock/angular-mocks.js
vendored
@@ -467,9 +467,9 @@ angular.mock.$IntervalProvider = function() {
|
||||
var $interval = function(fn, delay, count, invokeApply) {
|
||||
var deferred = $q.defer(),
|
||||
promise = deferred.promise,
|
||||
count = (isDefined(count)) ? count : 0,
|
||||
count = (angular.isDefined(count)) ? count : 0,
|
||||
iteration = 0,
|
||||
skipApply = (isDefined(invokeApply) && !invokeApply);
|
||||
skipApply = (angular.isDefined(invokeApply) && !invokeApply);
|
||||
|
||||
promise.then(null, null, fn);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user