Skip to content

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 angular#3612
  • Loading branch information
Adam de Baugh authored and jamesdaily committed Sep 25, 2013
1 parent 548cdbd commit 03fbbf3
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 03fbbf3

Please sign in to comment.