don't use initializer property for decorators on concise methods in object literals
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user