diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp index abd864364a..11d585d775 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp @@ -244,13 +244,13 @@ ThrowCompletionOr to_temporal_offset(VM& vm, Object const* options, Stri } // 13.9 ToCalendarNameOption ( normalizedOptions ), https://tc39.es/proposal-temporal/#sec-temporal-tocalendarnameoption -ThrowCompletionOr to_calendar_name_option(VM& vm, Object const& normalized_options) +ThrowCompletionOr to_calendar_name_option(VM& vm, Object const& normalized_options) { // 1. Return ? GetOption(normalizedOptions, "calendarName", "string", « "auto", "always", "never", "critical" », "auto"). auto option = TRY(get_option(vm, normalized_options, vm.names.calendarName, OptionType::String, { "auto"sv, "always"sv, "never"sv, "critical"sv }, "auto"sv)); VERIFY(option.is_string()); - return TRY(option.as_string().deprecated_string()); + return option.as_string().utf8_string(); } // 13.10 ToTimeZoneNameOption ( normalizedOptions ), https://tc39.es/proposal-temporal/#sec-temporal-totimezonenameoption diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h index 8ea2b4fc41..96f5c8db6d 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h @@ -140,7 +140,7 @@ ThrowCompletionOr to_temporal_disambiguation(VM&, Object const* options) ThrowCompletionOr to_temporal_rounding_mode(VM&, Object const& normalized_options, StringView fallback); StringView negate_temporal_rounding_mode(StringView rounding_mode); ThrowCompletionOr to_temporal_offset(VM&, Object const* options, StringView fallback); -ThrowCompletionOr to_calendar_name_option(VM&, Object const& normalized_options); +ThrowCompletionOr to_calendar_name_option(VM&, Object const& normalized_options); ThrowCompletionOr to_time_zone_name_option(VM&, Object const& normalized_options); ThrowCompletionOr to_show_offset_option(VM&, Object const& normalized_options); ThrowCompletionOr to_temporal_rounding_increment(VM&, Object const& normalized_options, Optional dividend, bool inclusive);