From 12549f69b085fb1ff463c4c38197e67d7f75a209 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Wed, 5 Apr 2017 12:14:46 -0700 Subject: [PATCH] Address PR --- src/compiler/factory.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 8d6390b6dc6..56b580f4f18 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -3491,9 +3491,7 @@ namespace ts { } export function parenthesizeConciseBody(body: ConciseBody): ConciseBody { - const emittedBody = skipPartiallyEmittedExpressions(body); - const leftMostExpression = isExpression(emittedBody) ? getLeftmostExpression(emittedBody) : undefined; - if (leftMostExpression && leftMostExpression.kind === SyntaxKind.ObjectLiteralExpression) { + if (!isBlock(body) && getLeftmostExpression(body).kind === SyntaxKind.ObjectLiteralExpression) { return setTextRange(createParen(body), body); }