diff --git a/lib/6to5/transformation/modules/common-interop.js b/lib/6to5/transformation/modules/common-interop.js index 97d64e828d..2e8ceafa0e 100644 --- a/lib/6to5/transformation/modules/common-interop.js +++ b/lib/6to5/transformation/modules/common-interop.js @@ -22,8 +22,7 @@ CommonJSInteropFormatter.prototype.importSpecifier = function (specifier, node, })]) ) ])); - return; + } else { + CommonJSFormatter.prototype.importSpecifier.apply(this, arguments); } - - CommonJSFormatter.prototype.importSpecifier.apply(this, arguments); }; diff --git a/lib/6to5/transformation/transformers/_declarations.js b/lib/6to5/transformation/transformers/_declarations.js index d1d222c9b7..077337b500 100644 --- a/lib/6to5/transformation/transformers/_declarations.js +++ b/lib/6to5/transformation/transformers/_declarations.js @@ -4,9 +4,10 @@ var _ = require("lodash"); module.exports = function (ast, file) { var body = ast.program.body; - _.each(file.declarations, function (declar) { + for (var i in file.declarations) { + var declar = file.declarations[i]; body.unshift(t.variableDeclaration("var", [ t.variableDeclarator(declar.uid, declar.node) ])); - }); + } }; diff --git a/lib/6to5/transformation/transformers/template-literals.js b/lib/6to5/transformation/transformers/template-literals.js index 2ea8bd81e1..6100f6d326 100644 --- a/lib/6to5/transformation/transformers/template-literals.js +++ b/lib/6to5/transformation/transformers/template-literals.js @@ -22,9 +22,7 @@ exports.TaggedTemplateExpression = function (node, parent, file) { t.arrayExpression(raw) ])); - _.each(quasi.expressions, function (expr) { - args.push(expr); - }); + args = args.concat(quasi.expressions); return t.callExpression(node.tag, args); };