Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit 67317a4

Browse files
committed
fix(ngHintModules): handle case where ng-app is not used
1 parent 3773b30 commit 67317a4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

dist/hint.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,9 @@ angular.module = function(name, requiresOriginal) {
13501350

13511351
angular.module('ngHintModules', []).config(function() {
13521352
var ngAppMod = modules[modData.ngAppMod];
1353-
storeUsedModules(ngAppMod, modules);
1353+
if (ngAppMod) {
1354+
storeUsedModules(ngAppMod, modules);
1355+
}
13541356
start();
13551357
});
13561358

src/modules/modules.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ angular.module = function(name, requiresOriginal) {
3939

4040
angular.module('ngHintModules', []).config(function() {
4141
var ngAppMod = modules[modData.ngAppMod];
42-
storeUsedModules(ngAppMod, modules);
42+
if (ngAppMod) {
43+
storeUsedModules(ngAppMod, modules);
44+
}
4345
start();
4446
});

0 commit comments

Comments
 (0)