mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
LibJS: Mark two Get operations in ToTemporalZonedDateTime infallible
This is an editorial change in the Temporal spec.
See: fed9f16
This commit is contained in:
parent
a5c41aa905
commit
74695ce76e
1 changed files with 4 additions and 4 deletions
|
@ -155,14 +155,14 @@ ThrowCompletionOr<ZonedDateTime*> to_temporal_zoned_date_time(GlobalObject& glob
|
||||||
// f. Let fields be ? PrepareTemporalFields(item, fieldNames, « "timeZone" »).
|
// f. Let fields be ? PrepareTemporalFields(item, fieldNames, « "timeZone" »).
|
||||||
auto* fields = TRY(prepare_temporal_fields(global_object, item_object, field_names, { "timeZone"sv }));
|
auto* fields = TRY(prepare_temporal_fields(global_object, item_object, field_names, { "timeZone"sv }));
|
||||||
|
|
||||||
// g. Let timeZone be ? Get(fields, "timeZone").
|
// g. Let timeZone be ! Get(fields, "timeZone").
|
||||||
auto time_zone_value = TRY(fields->get(vm.names.timeZone));
|
auto time_zone_value = MUST(fields->get(vm.names.timeZone));
|
||||||
|
|
||||||
// h. Set timeZone to ? ToTemporalTimeZone(timeZone).
|
// h. Set timeZone to ? ToTemporalTimeZone(timeZone).
|
||||||
time_zone = TRY(to_temporal_time_zone(global_object, time_zone_value));
|
time_zone = TRY(to_temporal_time_zone(global_object, time_zone_value));
|
||||||
|
|
||||||
// i. Let offsetString be ? Get(fields, "offset").
|
// i. Let offsetString be ! Get(fields, "offset").
|
||||||
auto offset_string_value = TRY(fields->get(vm.names.offset));
|
auto offset_string_value = MUST(fields->get(vm.names.offset));
|
||||||
|
|
||||||
// j. If offsetString is undefined, then
|
// j. If offsetString is undefined, then
|
||||||
if (offset_string_value.is_undefined()) {
|
if (offset_string_value.is_undefined()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue