Only slice arguments when necessary - fixes #239
This commit is contained in:
@@ -64,7 +64,12 @@ exports.CallExpression = function (node, parent, file) {
|
||||
|
||||
node.arguments = [];
|
||||
|
||||
var nodes = build(args, file);
|
||||
var nodes;
|
||||
if (args.length === 1 && args[0].argument.name === 'arguments') {
|
||||
nodes = [args[0].argument];
|
||||
} else {
|
||||
nodes = build(args, file);
|
||||
}
|
||||
var first = nodes.shift();
|
||||
|
||||
if (nodes.length) {
|
||||
|
||||
Reference in New Issue
Block a user