This commit is contained in:
SaschaNaz
2015-09-22 15:07:44 +09:00
parent b2cfddbe7a
commit 3dd7caafbf
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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 {
+1 -1
View File
@@ -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;
}