mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
LibJS: Convert prepare_temporal_fields() to ThrowCompletionOr
This commit is contained in:
parent
9ac426c906
commit
6b4777c558
10 changed files with 22 additions and 49 deletions
|
@ -122,9 +122,7 @@ PlainDate* to_temporal_date(GlobalObject& global_object, Value item, Object* opt
|
|||
return {};
|
||||
|
||||
// f. Let fields be ? PrepareTemporalFields(item, fieldNames, «»).
|
||||
auto* fields = prepare_temporal_fields(global_object, item_object, field_names, {});
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto* fields = TRY_OR_DISCARD(prepare_temporal_fields(global_object, item_object, field_names, {}));
|
||||
|
||||
// g. Return ? DateFromFields(calendar, fields, options).
|
||||
return date_from_fields(global_object, *calendar, *fields, *options);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue