Commit e3aaa00 1 parent 308fda0 commit e3aaa00 Copy full SHA for e3aaa00
File tree 1 file changed +9
-8
lines changed
packages/@aws-cdk/cloudformation-include/lib
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -513,18 +513,19 @@ export class CfnInclude extends core.CfnElement {
513
513
const template = new CfnInclude ( nestedStack , nestedStackId , this . nestedStacksToInclude [ nestedStackId ] ) ;
514
514
515
515
// remove parameters replaced in the child stack from the parent's CloudFormation::Stack resource
516
- const parameters = nestedStackProps . Parameters ;
516
+ if ( nestedStackProps . Parameters ) {
517
+ const parameters = nestedStackProps . Parameters ;
517
518
518
- for ( const param of Object . keys ( parameters ) ) {
519
- if ( template . parametersToReplace [ param ] ) {
520
- delete parameters [ param ] ;
519
+ for ( const param of Object . keys ( parameters ) ) {
520
+ if ( template . parametersToReplace [ param ] ) {
521
+ delete parameters [ param ] ;
522
+ }
521
523
}
522
- }
523
524
524
- if ( parameters . length === 0 ) {
525
- delete nestedStackProps . Parameters ;
525
+ if ( parameters . length === 0 ) {
526
+ delete nestedStackProps . Parameters ;
527
+ }
526
528
}
527
-
528
529
const includedStack : IncludedNestedStack = { stack : nestedStack , includedTemplate : template } ;
529
530
this . nestedStacks [ nestedStackId ] = includedStack ;
530
531
You can’t perform that action at this time.
0 commit comments