mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-10 17:15:26 +08: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:
committed by
Vojta Jina
parent
c65fcc003d
commit
baaa73ee1e
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 {
|
||||
|
||||
Reference in New Issue
Block a user