diff --git a/lib/6to5/generation/generators/methods.js b/lib/6to5/generation/generators/methods.js index 40a4e52b89..341914c914 100644 --- a/lib/6to5/generation/generators/methods.js +++ b/lib/6to5/generation/generators/methods.js @@ -8,25 +8,9 @@ exports._params = function (node, print) { this.push("("); print.join(node.params, { - separator: ", ", - iterator: function (param, i) { - var def = node.defaults && node.defaults[i]; - if (def) { - self.push(" = "); - print(def); - } - } + separator: ", " }); - if (node.rest) { - if (node.params.length) { - this.push(", "); - } - - this.push("..."); - print(node.rest); - } - this.push(")"); }; @@ -73,7 +57,7 @@ exports.FunctionExpression = function (node, print) { exports.ArrowFunctionExpression = function (node, print) { if (node.async) this.push("async "); - if (node.params.length === 1 && !node.defaults.length && !node.rest && t.isIdentifier(node.params[0])) { + if (node.params.length === 1 && t.isIdentifier(node.params[0])) { print(node.params[0]); } else { this._params(node, print);