Skip to content

Commit

Permalink
generate children faster
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Apr 22, 2017
1 parent 2088081 commit 98ac037
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -1557,9 +1557,11 @@
call += generateProps(vnode, parentVNode) + ", ";

// Generate code for children recursively here (in case modified by special directives)
var children = vnode.children.map(function (vchild) {
return generateEl(vchild, vnode);
});
var children = [];
var parsedChildren = vnode.children;
for (var i = 0; i < parsedChildren.length; i++) {
children.push(generateEl(parsedChildren[i], vnode));
}

// If the "shouldRender" flag is not present, ensure node will be updated
if (vnode.meta.shouldRender === true && parentVNode !== undefined) {
Expand Down
Loading

0 comments on commit 98ac037

Please sign in to comment.