1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:27:35 +00:00

LibJS: Convert prepare_temporal_fields() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-09-16 18:09:52 +01:00
parent 9ac426c906
commit 6b4777c558
10 changed files with 22 additions and 49 deletions

View file

@ -62,9 +62,7 @@ ThrowCompletionOr<PlainYearMonth*> to_temporal_year_month(GlobalObject& global_o
return throw_completion(exception->value());
// d. Let fields be ? PrepareTemporalFields(item, fieldNames, «»).
auto* fields = prepare_temporal_fields(global_object, item_object, field_names, {});
if (auto* exception = vm.exception())
return throw_completion(exception->value());
auto* fields = TRY(prepare_temporal_fields(global_object, item_object, field_names, {}));
// e. Return ? YearMonthFromFields(calendar, fields, options).
return year_month_from_fields(global_object, *calendar, *fields, options);