feat(render): add generic view factory based on the template commands

Part of #3605
Closes #4367
This commit is contained in:
Tobias Bosch
2015-09-25 09:43:21 -07:00
parent 0ed6fc4f6b
commit 1cf45757cd
11 changed files with 906 additions and 8 deletions

View File

@ -119,7 +119,8 @@ export function stringifyElement(el): string {
result += '>';
// Children
var children = DOM.childNodes(DOM.templateAwareRoot(el));
var childrenRoot = DOM.templateAwareRoot(el);
var children = isPresent(childrenRoot) ? DOM.childNodes(childrenRoot) : [];
for (let j = 0; j < children.length; j++) {
result += stringifyElement(children[j]);
}