From 2ffb30a99690bb9bb1b03d71ce50adae2a83324d Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Fri, 15 Oct 2021 01:08:02 +0100 Subject: [PATCH] LibJS: Don't return empty value from PromiseReactionJob::call(), for now --- Userland/Libraries/LibJS/Runtime/PromiseJobs.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/PromiseJobs.cpp b/Userland/Libraries/LibJS/Runtime/PromiseJobs.cpp index e5074f5ec0..319670ea26 100644 --- a/Userland/Libraries/LibJS/Runtime/PromiseJobs.cpp +++ b/Userland/Libraries/LibJS/Runtime/PromiseJobs.cpp @@ -53,7 +53,9 @@ Value PromiseReactionJob::call() if (!promise_capability.has_value()) { dbgln_if(PROMISE_DEBUG, "[PromiseReactionJob @ {}]: Reaction has no PromiseCapability, returning empty value", this); - return {}; + // TODO: This can't return an empty value at the moment, because the implicit conversion to Completion would fail. + // Change it back when this is using completions (`return normal_completion({})`) + return js_undefined(); } if (vm.exception()) {