add identifier check to class id inheritance

This commit is contained in:
Sebastian McKenzie
2015-01-15 19:29:27 +11:00
parent 6db7fce543
commit 688d619bfe

View File

@@ -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;
}
}