From 9bbd62f4543ad8760deec08170c674cc028772cc Mon Sep 17 00:00:00 2001 From: Mark J. Titorenko Date: Wed, 9 Oct 2013 16:31:51 +0100 Subject: 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 --- src/ngMock/angular-mocks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index 11f6f045..3592aacd 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -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); -- cgit v1.2.3