File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed
Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -183,19 +183,22 @@ export class CdkFramework implements IFramework {
183183 awsConfiguration ,
184184 ) ;
185185 // get all Lambda functions in the template
186- const lambdas = Object . entries ( cfTemplate . Resources )
187- . filter (
188- ( [ , resource ] : [ string , any ] ) =>
189- resource . Type === 'AWS::Lambda::Function' ,
190- )
191- . map ( ( [ key , resource ] : [ string , any ] ) => {
192- return {
193- logicalId : key ,
194- cdkPath : resource . Metadata [ 'aws:cdk:path' ] ,
195- } ;
196- } ) ;
186+ if ( cfTemplate ) {
187+ const lambdas = Object . entries ( cfTemplate . Resources )
188+ . filter (
189+ ( [ , resource ] : [ string , any ] ) =>
190+ resource . Type === 'AWS::Lambda::Function' ,
191+ )
192+ . map ( ( [ key , resource ] : [ string , any ] ) => {
193+ return {
194+ logicalId : key ,
195+ cdkPath : resource . Metadata [ 'aws:cdk:path' ] ,
196+ } ;
197+ } ) ;
198+ return lambdas ;
199+ }
197200
198- return lambdas ;
201+ return [ ] ;
199202 }
200203
201204 /**
You can’t perform that action at this time.
0 commit comments