diff --git a/app/Cfnpp/Functions.php b/app/Cfnpp/Functions.php index 59aa9bf..29131a8 100644 --- a/app/Cfnpp/Functions.php +++ b/app/Cfnpp/Functions.php @@ -195,13 +195,14 @@ class Functions $n_orig = new Node(null, $node->hasName() ? $node->getName() : null); $n_if = new Node($n_orig, 'Fn::If'); + $n_orig->addChild($n_if); $n_if->addChild(new NodeValue($n_if, null, $condition_name)); $n_if->addChild($if_true); if (isset($if_false)) { $n_if->addChild($if_false); } - return $n_if; + return $n_orig; } /**