Skip to content

Commit 12549f6

Browse files
author
Kanchalai Tanglertsampan
committed
Address PR
1 parent 33524bd commit 12549f6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/compiler/factory.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3491,9 +3491,7 @@ namespace ts {
34913491
}
34923492

34933493
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) {
3494+
if (!isBlock(body) && getLeftmostExpression(body).kind === SyntaxKind.ObjectLiteralExpression) {
34973495
return setTextRange(createParen(<Expression>body), body);
34983496
}
34993497

0 commit comments

Comments
 (0)