From 74695ce76ea5f6b88d8cb166621edafd1abedb47 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 17 May 2022 21:24:50 +0100 Subject: [PATCH] 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 --- .../Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp index 5069d2d9e57..4a2148735a6 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp @@ -155,14 +155,14 @@ ThrowCompletionOr 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()) {