Skip to content

Commit

Permalink
Correct outline hint spans for functions
Browse files Browse the repository at this point in the history
  • Loading branch information
amcasey committed Jun 12, 2019
1 parent cf7b19a commit fdacf7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/outliningElementsCollector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ namespace ts.OutliningElementsCollector {
? findChildOfKind(node, SyntaxKind.OpenParenToken, sourceFile)
: findChildOfKind(body, SyntaxKind.OpenBraceToken, sourceFile);
const closeToken = findChildOfKind(body, SyntaxKind.CloseBraceToken, sourceFile);
return openToken && closeToken && spanBetweenTokens(openToken, closeToken, node.parent, sourceFile, /*autoCollapse*/ node.parent.kind !== SyntaxKind.ArrowFunction);
return openToken && closeToken && spanBetweenTokens(openToken, closeToken, node, sourceFile, /*autoCollapse*/ node.kind !== SyntaxKind.ArrowFunction);
}

function spanBetweenTokens(openToken: Node, closeToken: Node, hintSpanNode: Node, sourceFile: SourceFile, autoCollapse = false, useFullStart = true): OutliningSpan {
Expand Down

0 comments on commit fdacf7f

Please sign in to comment.