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 Jan 27, 2014
1 parent ab359e1 commit 0c5ab2e
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 0c5ab2e

Please sign in to comment.