ignore binding elements when finding the last non-default param - fixes #723

This commit is contained in:
Sebastian McKenzie
2015-02-09 08:25:58 +11:00
parent ee5cb8d9ed
commit f845a9b2c4

View File

@@ -55,7 +55,9 @@ exports.Function = function (node, parent, scope, file) {
var param = node.params[i];
if (!t.isAssignmentPattern(param)) {
lastNonDefaultParam = i + 1;
if (!t.isBindingElement(param)) {
lastNonDefaultParam = i + 1;
}
if (!t.isIdentifier(param)) {
scope.traverse(param, iifeVisitor, state);