add identifier check to class id inheritance
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user