Merge pull request #3311 from babel/object-body

[T7047] Consider arrow functions when parenthesizing object expressions
This commit is contained in:
Henry Zhu
2016-02-04 14:44:22 -05:00
4 changed files with 8 additions and 12 deletions

View File

@@ -77,15 +77,5 @@ export function ArrowFunctionExpression(node: Object) {
this.push(" => ");
const bodyNeedsParens = t.isObjectExpression(node.body);
if (bodyNeedsParens) {
this.push("(");
}
this.print(node.body, node);
if (bodyNeedsParens) {
this.push(")");
}
}