move staticPropBody class concat to after className check in es6.classes transformer

This commit is contained in:
Sebastian McKenzie 2015-06-05 22:44:03 +01:00
parent b0442d0784
commit 7333b4e392

View File

@ -200,6 +200,8 @@ class ClassTransformer {
}
}
body = body.concat(this.staticPropBody);
if (this.className) {
// named class with only a constructor
if (body.length === 1) return t.toExpression(body[0]);
@ -214,8 +216,6 @@ class ClassTransformer {
t.inheritsComments(body[0], this.node);
}
body = body.concat(this.staticPropBody);
//
body.push(t.returnStatement(classRef));