From: Fabrice Bellard Date: Mon, 22 Jan 2024 17:03:35 +0000 (+0100) Subject: fixed js_std_await() in case 'obj' is not a promise (github issue #222) X-Git-Url: http://git.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=67723c93e4241508ad1ff9bfad142e39f3f2cf88;p=quickjs.git fixed js_std_await() in case 'obj' is not a promise (github issue #222) --- 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;