1
Fork 0
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:
Linus Groh 2021-09-15 23:11:02 +01:00
parent 683e31e1ff
commit f2b5ddd167
3 changed files with 13 additions and 14 deletions

View file

@ -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)