Skip to content

Commit

Permalink
Merge pull request #1743 from Connormiha/optimize-create-element-arra…
Browse files Browse the repository at this point in the history
…y-children

Optimize creating array of childrens
  • Loading branch information
cristianbote committed Aug 29, 2019
2 parents a16af18 + 3c4a7f6 commit 9acd094
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/create-element.js
Expand Up @@ -13,8 +13,8 @@ export function createElement(type, props, children) {
props = assign({}, props);

if (arguments.length>3) {
children = [children];
for (let i=3; i<arguments.length; i++) {
children = [];
for (let i=2; i<arguments.length; i++) {
children.push(arguments[i]);
}
}
Expand Down

0 comments on commit 9acd094

Please sign in to comment.