diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index 9f300f1db7a..412daaa8ab0 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -391,7 +391,7 @@ namespace ts.formatting { effectiveParentStartLine: number): Indentation { let indentation = inheritedIndentation; - var delta = SmartIndenter.shouldIndentChildNode(node, null) ? options.IndentSize : 0; + var delta = SmartIndenter.shouldIndentChildNode(node) ? options.IndentSize : 0; if (effectiveParentStartLine === startLine) { // if node is located on the same line with the parent @@ -490,7 +490,7 @@ namespace ts.formatting { indentation -= options.IndentSize; } - if (SmartIndenter.shouldIndentChildNode(node, null)) { + if (SmartIndenter.shouldIndentChildNode(node)) { delta = options.IndentSize; } else { diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 4477ea760bb..dfe94b3fdbb 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -471,7 +471,7 @@ namespace ts.formatting { return indentByDefault; } - export function shouldIndentChildNode(parent: TextRangeWithKind, child: TextRangeWithKind): boolean { + export function shouldIndentChildNode(parent: TextRangeWithKind, child?: TextRangeWithKind): boolean { if (nodeContentIsAlwaysIndented(parent.kind)) { return true; }