1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:17: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

@ -183,9 +183,7 @@ PlainDateTime* to_temporal_date_time(GlobalObject& global_object, Value item, Ob
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. Let result be ? InterpretTemporalDateTimeFields(calendar, fields, options).
auto maybe_result = interpret_temporal_date_time_fields(global_object, *calendar, *fields, *options);