add support for a string literal constructor name
This commit is contained in:
@@ -159,7 +159,7 @@ ClassTransformer.prototype.buildBody = function () {
|
||||
}, true);
|
||||
replaceSupers.replace();
|
||||
|
||||
if (node.key.name === "constructor") {
|
||||
if ((!node.computed && t.isIdentifier(node.key, { name: "constructor" })) || t.isLiteral(node.key, { value: "constructor" })) {
|
||||
this.pushConstructor(node);
|
||||
} else {
|
||||
this.pushMethod(node);
|
||||
|
||||
Reference in New Issue
Block a user