From 15be89a758e49a45ba394f1bff23791f9f4d5cd6 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Mon, 28 Oct 2019 14:33:53 +0300 Subject: [PATCH] JS: fix source map generation in some cases --- .../java/org/teavm/debugging/information/LayerIterator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/teavm/debugging/information/LayerIterator.java b/core/src/main/java/org/teavm/debugging/information/LayerIterator.java index ee8e5ae59..0f091e048 100644 --- a/core/src/main/java/org/teavm/debugging/information/LayerIterator.java +++ b/core/src/main/java/org/teavm/debugging/information/LayerIterator.java @@ -26,7 +26,9 @@ class LayerIterator { methodIterators[i] = new MethodIterator(debugInformation.layers[i]); } - nextImpl(); + if (!isEndReached()) { + nextImpl(); + } } public boolean isEndReached() {