diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index 2cd94486832..cdd7c135a0c 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -237,9 +237,10 @@ module ts.formatting { // determine child indentation // TODO: share this code with SmartIndenter + // NOTE: SI uses non-adjusted lines var increaseIndentation = childStartLine !== nodeStartLine && - !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) && + !SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine + 1, sourceFile) && SmartIndenter.shouldIndentChildNode(node, child); processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation);