diff --git a/lib/6to5/transformation/transformers/es6-arrow-functions.js b/lib/6to5/transformation/transformers/es6-arrow-functions.js index 80a45e573b..40f9ab9906 100644 --- a/lib/6to5/transformation/transformers/es6-arrow-functions.js +++ b/lib/6to5/transformation/transformers/es6-arrow-functions.js @@ -3,7 +3,7 @@ var t = require("../../types"); exports.ArrowFunctionExpression = function (node) { t.ensureBlock(node); - node._aliasFunction = true; + node._aliasFunction = "arrow"; node.expression = false; node.type = "FunctionExpression"; diff --git a/lib/6to5/transformation/transformers/es6-rest-parameters.js b/lib/6to5/transformation/transformers/es6-rest-parameters.js index 060259a94b..0d67a8b261 100644 --- a/lib/6to5/transformation/transformers/es6-rest-parameters.js +++ b/lib/6to5/transformation/transformers/es6-rest-parameters.js @@ -14,7 +14,7 @@ exports.Function = function (node, parent, file) { call.arguments.push(t.literal(node.params.length)); } - if (!node._aliasFunction) call._ignoreAliasFunctions = true; + if (!node._aliasFunction || node._aliasFunction === "arrow") call._ignoreAliasFunctions = true; node.body.body.unshift(t.variableDeclaration("var", [ t.variableDeclarator(rest, call)