mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-16 06:30:41 +00:00
LibJS: Mark two Get operations in ToTemporalZonedDateTime infallible
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/fed9f16
This commit is contained in:
parent
a5c41aa905
commit
74695ce76e
|
@ -155,14 +155,14 @@ ThrowCompletionOr<ZonedDateTime*> to_temporal_zoned_date_time(GlobalObject& glob
|
|||
// f. Let fields be ? PrepareTemporalFields(item, fieldNames, « "timeZone" »).
|
||||
auto* fields = TRY(prepare_temporal_fields(global_object, item_object, field_names, { "timeZone"sv }));
|
||||
|
||||
// g. Let timeZone be ? Get(fields, "timeZone").
|
||||
auto time_zone_value = TRY(fields->get(vm.names.timeZone));
|
||||
// g. Let timeZone be ! Get(fields, "timeZone").
|
||||
auto time_zone_value = MUST(fields->get(vm.names.timeZone));
|
||||
|
||||
// h. Set timeZone to ? ToTemporalTimeZone(timeZone).
|
||||
time_zone = TRY(to_temporal_time_zone(global_object, time_zone_value));
|
||||
|
||||
// i. Let offsetString be ? Get(fields, "offset").
|
||||
auto offset_string_value = TRY(fields->get(vm.names.offset));
|
||||
// i. Let offsetString be ! Get(fields, "offset").
|
||||
auto offset_string_value = MUST(fields->get(vm.names.offset));
|
||||
|
||||
// j. If offsetString is undefined, then
|
||||
if (offset_string_value.is_undefined()) {
|
||||
|
|
Loading…
Reference in a new issue