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

Commit

Permalink
fix(ngMocks): $logProvider should not use internal APIs
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Adam de Baugh authored and vojtajina committed Aug 29, 2013
1 parent c65fcc0 commit baaa73e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ngMock/angular-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ angular.mock.$LogProvider = function() {
}

this.debugEnabled = function(flag) {
if (isDefined(flag)) {
if (angular.isDefined(flag)) {
debug = flag;
return this;
} else {
Expand Down

0 comments on commit baaa73e

Please sign in to comment.