From 95acb1ce885b2d2b833e6f4e3b12dfd41b50bc80 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 28 Dec 2021 17:57:09 +0100 Subject: LibJS: Don't assume non-empty [[Value]] in Completion TRY() helpers --- Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp') diff --git a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp index 5ad4293a26..a2851992d0 100644 --- a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp @@ -226,7 +226,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::from_entries) auto* object = Object::create(global_object, global_object.object_prototype()); - TRY(get_iterator_values(global_object, iterable, [&](Value iterator_value) -> Optional { + (void)TRY(get_iterator_values(global_object, iterable, [&](Value iterator_value) -> Optional { if (!iterator_value.is_object()) return vm.throw_completion(global_object, ErrorType::NotAnObject, String::formatted("Iterator value {}", iterator_value.to_string_without_side_effects())); -- cgit v1.2.3