Create a duplicate class identiier to avoid sharing 'loc'.
This commit is contained in:
parent
3cb9c90c31
commit
7d6d4c204b
@ -88,7 +88,7 @@ export default class ClassTransformer {
|
||||
this.classId = this.node.id;
|
||||
|
||||
// this is the name of the binding that will **always** reference the class we've constructed
|
||||
this.classRef = this.node.id || this.scope.generateUidIdentifier("class");
|
||||
this.classRef = this.node.id ? t.identifier(this.node.id.name) : this.scope.generateUidIdentifier("class");
|
||||
|
||||
this.superName = this.node.superClass || t.identifier("Function");
|
||||
this.isDerived = !!this.node.superClass;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user