From 67723c93e4241508ad1ff9bfad142e39f3f2cf88 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Mon, 22 Jan 2024 18:03:35 +0100 Subject: [PATCH] fixed js_std_await() in case 'obj' is not a promise (github issue #222) --- quickjs-libc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/quickjs-libc.c b/quickjs-libc.c index 67fe2f6..6d50a90 100644 --- a/quickjs-libc.c +++ b/quickjs-libc.c @@ -3974,6 +3974,7 @@ JSValue js_std_await(JSContext *ctx, JSValue obj) } else { /* not a promise */ ret = obj; + break; } } return ret;