diff --git a/lib/6to5/transformation/transformers/react.js b/lib/6to5/transformation/transformers/react.js index e43cd2ddfb..76a613cf32 100644 --- a/lib/6to5/transformation/transformers/react.js +++ b/lib/6to5/transformation/transformers/react.js @@ -38,7 +38,7 @@ exports.XJSAttribute = { }; exports.XJSOpeningElement = { - exit: function (node, parent, file) { + exit: function (node) { var tagExpr = node.name; var args = []; @@ -81,13 +81,12 @@ exports.XJSOpeningElement = { exports.XJSElement = { exit: function (node) { var callExpr = node.openingElement; - var children = node.children; var childrenToRender = node.children.filter(function(child) { return !(t.isLiteral(child) && _.isString(child.value) && child.value.match(/^[ \t]*[\r\n][ \t\r\n]*$/)); }); - _.each(childrenToRender, function (child, i) { + _.each(childrenToRender, function (child) { callExpr.arguments.push(child); });