mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +00:00
LibJS: Convert iterable_to_list_of_type() to ThrowCompletionOr
This commit is contained in:
parent
683e31e1ff
commit
f2b5ddd167
3 changed files with 13 additions and 14 deletions
|
@ -110,9 +110,7 @@ Vector<String> calendar_fields(GlobalObject& global_object, Object& calendar, Ve
|
|||
}
|
||||
|
||||
// 4. Return ? IterableToListOfType(fieldsArray, « String »).
|
||||
auto list = iterable_to_list_of_type(global_object, fields_array, { OptionType::String });
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto list = TRY_OR_DISCARD(iterable_to_list_of_type(global_object, fields_array, { OptionType::String }));
|
||||
|
||||
Vector<String> result;
|
||||
for (auto& value : list)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue