From c5f6c4fac086bb73b8e277f9572bbb5b9684c0a5 Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Mon, 26 Jun 2017 11:21:16 -0700 Subject: [PATCH] remove unecessary check --- src/services/formatting/formatting.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index 86935fb3984..f6eaa812f45 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -104,9 +104,7 @@ namespace ts.formatting { export function formatOnOpeningCurly(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeSettings): TextChange[] { const openingCurly = findImmediatelyPrecedingTokenOfKind(position, SyntaxKind.OpenBraceToken, sourceFile); const curlyBraceRange = openingCurly && openingCurly.parent; - return curlyBraceRange ? - formatOutermostNodeWithinListLevel(curlyBraceRange, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnOpeningCurlyBrace) : - []; + return formatOutermostNodeWithinListLevel(curlyBraceRange, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnOpeningCurlyBrace); } export function formatOnClosingCurly(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeSettings): TextChange[] {