We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33524bd commit 12549f6Copy full SHA for 12549f6
src/compiler/factory.ts
@@ -3491,9 +3491,7 @@ namespace ts {
3491
}
3492
3493
export function parenthesizeConciseBody(body: ConciseBody): ConciseBody {
3494
- const emittedBody = skipPartiallyEmittedExpressions(body);
3495
- const leftMostExpression = isExpression(emittedBody) ? getLeftmostExpression(emittedBody) : undefined;
3496
- if (leftMostExpression && leftMostExpression.kind === SyntaxKind.ObjectLiteralExpression) {
+ if (!isBlock(body) && getLeftmostExpression(body).kind === SyntaxKind.ObjectLiteralExpression) {
3497
return setTextRange(createParen(<Expression>body), body);
3498
3499
0 commit comments