From cb9fc4b1f3372d35ae4944b4e8dd930445283aeb Mon Sep 17 00:00:00 2001 From: Fabio Mascarenhas Date: Mon, 10 Sep 2018 11:15:07 -0400 Subject: [PATCH] guard against a module with no annotations having a decorator with no arguments --- packages/core/src/probes/shared-helpers/ng-module/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/probes/shared-helpers/ng-module/index.ts b/packages/core/src/probes/shared-helpers/ng-module/index.ts index 98ce2421..ca967419 100644 --- a/packages/core/src/probes/shared-helpers/ng-module/index.ts +++ b/packages/core/src/probes/shared-helpers/ng-module/index.ts @@ -9,7 +9,7 @@ export const getAnnotationsFromModule = module => { if (module.__annotations__) { return module.__annotations__[0] } - if (module.decorators) { + if (module.decorators && module.decorators[0].args) { return module.decorators[0].args[0] } else { return {}