diff --git a/lib/6to5/transformation/transformers/es6-default-parameters.js b/lib/6to5/transformation/transformers/es6-default-parameters.js index 6a7e394642..3901f6defa 100644 --- a/lib/6to5/transformation/transformers/es6-default-parameters.js +++ b/lib/6to5/transformation/transformers/es6-default-parameters.js @@ -11,7 +11,7 @@ exports.Function = function (node, parent, file, scope) { return t.getIds(param); }); - var closure = false; + var iife = false; _.each(node.defaults, function (def, i) { if (!def) return; @@ -29,7 +29,7 @@ exports.Function = function (node, parent, file, scope) { } if (scope.has(node.name)) { - closure = true; + iife = true; } }; @@ -40,7 +40,7 @@ exports.Function = function (node, parent, file, scope) { // we're accessing a variable that's already defined within this function var has = scope.get(param.name); if (has && !_.contains(node.params, has)) { - closure = true; + iife = true; } }); @@ -55,7 +55,7 @@ exports.Function = function (node, parent, file, scope) { }, true)); }); - if (closure) { + if (iife) { var container = t.functionExpression(null, [], node.body, node.generator); container._aliasFunction = true;