mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
LibJS: Don't assume non-empty [[Value]] in Completion TRY() helpers
This commit is contained in:
parent
032e6a2d28
commit
95acb1ce88
8 changed files with 10 additions and 9 deletions
|
@ -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<Completion> {
|
||||
(void)TRY(get_iterator_values(global_object, iterable, [&](Value iterator_value) -> Optional<Completion> {
|
||||
if (!iterator_value.is_object())
|
||||
return vm.throw_completion<TypeError>(global_object, ErrorType::NotAnObject, String::formatted("Iterator value {}", iterator_value.to_string_without_side_effects()));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue