Browse Source

Bugfix: !if that creates cfn conditions properly replaces parent node

master v0.2.0
Adam Pippin 3 years ago
parent
commit
9e5adfb9ce
  1. 3
      app/Cfnpp/Functions.php

3
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;
}
/**

Loading…
Cancel
Save