We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca53993 commit d009d8eCopy full SHA for d009d8e
src/services/outliningElementsCollector.ts
@@ -21,7 +21,7 @@ namespace ts.OutliningElementsCollector {
21
if (span) out.push(span);
22
23
depthRemaining--;
24
- if (isIfStatement(n) && isIfStatement(n.elseStatement)) {
+ if (isIfStatement(n) && n.elseStatement && isIfStatement(n.elseStatement)) {
25
// Consider an 'else if' to be on the same depth as the 'if'.
26
walk(n.expression);
27
walk(n.thenStatement);
0 commit comments