mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
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
This commit is contained in:
parent
c65fcc003d
commit
baaa73ee1e
1 changed files with 1 additions and 1 deletions
2
src/ngMock/angular-mocks.js
vendored
2
src/ngMock/angular-mocks.js
vendored
|
|
@ -316,7 +316,7 @@ angular.mock.$LogProvider = function() {
|
|||
}
|
||||
|
||||
this.debugEnabled = function(flag) {
|
||||
if (isDefined(flag)) {
|
||||
if (angular.isDefined(flag)) {
|
||||
debug = flag;
|
||||
return this;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue