diff --git a/teavm-core/src/main/java/org/teavm/javascript/BreakEliminator.java b/teavm-core/src/main/java/org/teavm/javascript/BreakEliminator.java index 94bb2ef74..b0421551a 100644 --- a/teavm-core/src/main/java/org/teavm/javascript/BreakEliminator.java +++ b/teavm-core/src/main/java/org/teavm/javascript/BreakEliminator.java @@ -138,8 +138,14 @@ class BreakEliminator implements StatementVisitor { @Override public void visit(TryCatchStatement statement) { + Map> oldBlockSuccessors = blockSuccessors; + Set oldOuterStatements = outerStatements; + outerStatements = new HashSet<>(); + blockSuccessors = new HashMap<>(); processSequence(statement.getProtectedBody()); processSequence(statement.getHandler()); + outerStatements = oldOuterStatements; + blockSuccessors = oldBlockSuccessors; } @Override