]> git.kaiwu.me - quickjs.git/commitdiff
fixed Iterator.prototype.reduce empty iterator closing
authorFabrice Bellard <fabrice@bellard.org>
Sat, 31 Oct 2026 17:28:54 +0000 (18:28 +0100)
committerFabrice Bellard <fabrice@bellard.org>
Sat, 31 Oct 2026 17:28:54 +0000 (18:28 +0100)
quickjs.c

index 4a4ff063c29cea490d5a4a028cc3eb04afe13ec4..54eae1df96c530a08dc9da09df58e30e9cd78bfe 100644 (file)
--- a/quickjs.c
+++ b/quickjs.c
@@ -46652,7 +46652,7 @@ static JSValue js_iterator_proto_reduce(JSContext *ctx, JSValueConst this_val,
             goto exception_no_close;
         if (done) {
             JS_ThrowTypeError(ctx, "empty iterator");
-            goto exception;
+            goto exception_no_close;
         }
         idx = 1;
     }