don't use initializer property for decorators on concise methods in object literals

This commit is contained in:
Sebastian McKenzie
2015-06-01 22:32:04 +01:00
parent 012ac7d9ec
commit 1934c16f0f
2 changed files with 2 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ export function ObjectExpression(node, parent, scope, file) {
if (prop.decorators) memoiseDecorators(prop.decorators, scope);
if (prop.kind === "init") {
if (prop.kind === "init" && !prop.method) {
prop.kind = "";
prop.value = t.functionExpression(null, [], t.blockStatement([
t.returnStatement(prop.value)