mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Fix bug: IfStatement#elseStatement can be undefined (#23467)
This commit is contained in:
parent
ca53993e41
commit
d009d8efcf
@ -21,7 +21,7 @@ namespace ts.OutliningElementsCollector {
|
||||
if (span) out.push(span);
|
||||
|
||||
depthRemaining--;
|
||||
if (isIfStatement(n) && isIfStatement(n.elseStatement)) {
|
||||
if (isIfStatement(n) && n.elseStatement && isIfStatement(n.elseStatement)) {
|
||||
// Consider an 'else if' to be on the same depth as the 'if'.
|
||||
walk(n.expression);
|
||||
walk(n.thenStatement);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user