support nested arrow functions - fixes #60
This commit is contained in:
@@ -29,6 +29,12 @@ var go = function (getBody, node, file) {
|
||||
|
||||
// traverse all child nodes of this function and find arguments and this
|
||||
traverse(node, function (node, parent) {
|
||||
if (_aliasFunction === "arrows") {
|
||||
if (traverse.isFunction(node) && node._aliasFunction !== "arrows") {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var getId;
|
||||
|
||||
if (node.type === "Identifier" && node.name === "arguments") {
|
||||
@@ -40,7 +46,7 @@ var go = function (getBody, node, file) {
|
||||
}
|
||||
|
||||
if (util.isReferenced(node, parent)) return getId();
|
||||
}, _aliasFunction === "arrows" && ["FunctionExpression", "FunctionDeclaration"]);
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user