From baaa73ee1ef25fa506ff7aaab3159d710acdafdb Mon Sep 17 00:00:00 2001 From: Adam de Baugh Date: Thu, 29 Aug 2013 13:30:32 +1000 Subject: [PATCH] fix(ngMocks): $logProvider should not use internal APIs angular.mocks.$LogProvider $logProvider.debugEnabled(false) is crashing with undefined when run inside karma/jasmine test runner: angular.module('foo', []).config(['$logProvider', function ($logProvider) { $logProvider.debugEnabled(false); }]); Closes #3612 --- src/ngMock/angular-mocks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index 125a42a65c16..5e5041cbbacc 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -316,7 +316,7 @@ angular.mock.$LogProvider = function() { } this.debugEnabled = function(flag) { - if (isDefined(flag)) { + if (angular.isDefined(flag)) { debug = flag; return this; } else {