remove unnecessary derived class constructor name
This commit is contained in:
@@ -84,9 +84,9 @@ ClassTransformer.prototype.run = function () {
|
||||
body.push(constructor);
|
||||
} else {
|
||||
var constructorName = null;
|
||||
// when there is only constructor or nothing, constructor is not
|
||||
// wrapped in closure and has to be named
|
||||
if (this.node.body.body.length <= 1) {
|
||||
// when class has no parent and there is only constructor or nothing then
|
||||
// constructor is not wrapped in closure and has to be named
|
||||
if (!this.hasSuper && this.node.body.body.length <= 1) {
|
||||
constructorName = className;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user