From 0ba9216d6f9f389186a236e261fd3e12fb0de5d0 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 11 Nov 2014 19:14:00 +1100 Subject: [PATCH] remove unused variables in react transformer --- lib/6to5/transformation/transformers/react.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); });