diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/WeakMapConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/WeakMapConstructor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/WeakMapConstructor.cpp b/Userland/Libraries/LibJS/Runtime/WeakMapConstructor.cpp index 83af5b3e6c..23655100e7 100644 --- a/Userland/Libraries/LibJS/Runtime/WeakMapConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/WeakMapConstructor.cpp @@ -72,8 +72,8 @@ Value WeakMapConstructor::construct(FunctionObject& new_target) auto value = iterator_value.as_object().get(1); if (vm.exception()) return IterationDecision::Break; - (void)vm.call(adder.as_function(), Value(weak_map), key, value); - return vm.exception() ? IterationDecision::Break : IterationDecision::Continue; + auto result = vm.call(adder.as_function(), Value(weak_map), key, value); + return result.is_error() ? IterationDecision::Break : IterationDecision::Continue; }); if (vm.exception()) return {}; |