diff --git a/lib/6to5/transformation/transformers/es6-classes.js b/lib/6to5/transformation/transformers/es6-classes.js index 69d3a41205..04be814120 100644 --- a/lib/6to5/transformation/transformers/es6-classes.js +++ b/lib/6to5/transformation/transformers/es6-classes.js @@ -14,7 +14,8 @@ exports.ClassExpression = function (node, parent, file, scope) { node.id = parent.key; } - if (t.isVariableDeclarator(parent)) { + if (t.isVariableDeclarator(parent) && t.isIdentifier(parent.id)) { + // var foo = class {}; node.id = parent.id; } }