mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-24 18:28:57 +00:00
LibJS: Convert iterable_to_list_of_type() to ThrowCompletionOr
This commit is contained in:
parent
683e31e1ff
commit
f2b5ddd167
Notes:
sideshowbarker
2024-07-18 03:49:41 +09:00
Author: https://github.com/linusg
Commit: f2b5ddd167
Pull-request: https://github.com/SerenityOS/serenity/pull/10065
Reviewed-by: https://github.com/IdanHo ✅
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