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

Commit 9bbd62f

Browse files
mjtkopetebacondarwin
authored andcommitted
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
1 parent 1366556 commit 9bbd62f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ngMock/angular-mocks.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,9 @@ angular.mock.$IntervalProvider = function() {
467467
var $interval = function(fn, delay, count, invokeApply) {
468468
var deferred = $q.defer(),
469469
promise = deferred.promise,
470-
count = (isDefined(count)) ? count : 0,
470+
count = (angular.isDefined(count)) ? count : 0,
471471
iteration = 0,
472-
skipApply = (isDefined(invokeApply) && !invokeApply);
472+
skipApply = (angular.isDefined(invokeApply) && !invokeApply);
473473

474474
promise.then(null, null, fn);
475475

0 commit comments

Comments
 (0)