diff --git a/src/Fhtml/_FHtmlTemplateTrait.php b/src/Fhtml/_FHtmlTemplateTrait.php
index 53dfa6d..47b7e0b 100644
--- a/src/Fhtml/_FHtmlTemplateTrait.php
+++ b/src/Fhtml/_FHtmlTemplateTrait.php
@@ -26,7 +26,7 @@ trait _FHtmlTemplateTrait
private function _addStructRecursive ($node, FHtml $pointer) : void
{
- if ($node instanceof RawHtmlNode) {
+ if ($node instanceof HtmlElementNode) {
$pointer->curNode->add($node);
return;
}
@@ -49,10 +49,14 @@ private function _addStructRecursive ($node, FHtml $pointer) : void
$this->_addStructRecursive($value, $pointer->elem($key));
//if ($pointer->curNode !== $pointer->documentNode)
// $pointer->end();
+ continue;
}
if (is_int($key)) {
$this->_addStructRecursive($value, $pointer);
+ continue;
}
+ if ($value instanceof HtmlElementNode)
+ $pointer->curNode->add($value);
}
return;
}
@@ -62,4 +66,4 @@ public function tpl(array $input) : self
$this->_addStructRecursive($input, $this);
return $this;
}
-}
\ No newline at end of file
+}