removed obsolete code

This commit is contained in:
Fabien Potencier
2019-04-23 19:22:21 +02:00
parent 795c16882e
commit d10c0c33d3
+2 -2
View File
@@ -361,8 +361,8 @@ class Parser
}
// here, $nested means "being at the root level of a child template"
// we need to discard the wrapping "Twig_Node" for the "body" node
$nested = $nested || ('Twig_Node' !== \get_class($node) && Node::class !== \get_class($node));
// we need to discard the wrapping "Node" for the "body" node
$nested = $nested || Node::class !== \get_class($node);
foreach ($node as $k => $n) {
if (null !== $n && null === $this->filterBodyNodes($n, $nested)) {
$node->removeNode($k);