Skip to content

Commit 633bec8

Browse files
committed
fix: don't throw for karma
Fixes #129
1 parent 4f60d05 commit 633bec8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ocLazyLoad.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,8 +940,8 @@
940940
});
941941
}
942942

943-
if(initModules.length === 0) {
944-
throw 'No module found during bootstrap, unable to init ocLazyLoad';
943+
if(modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {
944+
console.error('No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.');
945945
}
946946

947947
var addReg = function addReg(moduleName) {

0 commit comments

Comments
 (0)