diff --git a/ts2panda/src/compiler.ts b/ts2panda/src/compiler.ts index 3a33940bd34a73b9d827a148c692b61c47f62067..7affc7fa7980ba9bb94ba6355086f0abf74e40bc 100644 --- a/ts2panda/src/compiler.ts +++ b/ts2panda/src/compiler.ts @@ -553,12 +553,7 @@ export class Compiler { this.compileCondition(stmt.expression, stmt.elseStatement ? ifElseLabel : ifEndLabel); this.compileStatement(stmt.thenStatement); if (stmt.elseStatement) { - let flowNode = jshelpers.getFlowNode(stmt); - if (flowNode !== undefined) { - if (!(flowNode.flags & ts.FlowFlags.Unreachable)) { // if not unreachable - this.pandaGen.branch(DebugInfo.getLastNode(), ifEndLabel); - } - } + this.pandaGen.branch(DebugInfo.getLastNode(), ifEndLabel); this.pandaGen.label(stmt, ifElseLabel); this.compileStatement(stmt.elseStatement); }