don't create a new binding for local class ids, just copy the parents - fixes #1547
This commit is contained in:
parent
01d399ee3c
commit
62b94f297a
@ -599,8 +599,13 @@ export default class Scope {
|
||||
|
||||
// Class
|
||||
|
||||
if (path.isClass() && path.has("id")) {
|
||||
this.registerBinding("var", path.get("id"));
|
||||
if (path.isClassDeclaration()) {
|
||||
var name = path.node.id.name;
|
||||
this.bindings[name] = this.parent.bindings[name];
|
||||
}
|
||||
|
||||
if (path.isClassExpression() && path.has("id")) {
|
||||
this.registerBinding("var", path);
|
||||
}
|
||||
|
||||
// Function - params, rest
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user