remove unnecessary derived class constructor name

This commit is contained in:
neVERberleRfellerER
2015-02-23 17:39:42 +01:00
parent 3cf7b2b761
commit 9621d1bbeb

View File

@@ -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;
}