Skip to content

Commit 03fbbf3

Browse files
Adam de Baughjamesdaily
Adam de Baugh
authored andcommitted
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 angular#3612
1 parent 548cdbd commit 03fbbf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngMock/angular-mocks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ angular.mock.$LogProvider = function() {
316316
}
317317

318318
this.debugEnabled = function(flag) {
319-
if (isDefined(flag)) {
319+
if (angular.isDefined(flag)) {
320320
debug = flag;
321321
return this;
322322
} else {

0 commit comments

Comments
 (0)