diff options
author | Linus Groh <mail@linusgroh.de> | 2022-01-13 19:25:36 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-01-13 19:25:56 +0100 |
commit | 64f125fe34393aec3b5a96ac38918feb8c893047 (patch) | |
tree | 8ecb3a9c68ba59ebf8cbc068582b34778164f1f1 /Userland/Libraries | |
parent | 2255e8859ce839a930d89a3e3ce07571f8bf3a83 (diff) | |
download | serenity-64f125fe34393aec3b5a96ac38918feb8c893047.zip |
LibJS: Mark CreateTemporalTimeZone("UTC") as infallible
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/ea25cfa
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp index e8595d553a..3bb375ca83 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp @@ -240,9 +240,8 @@ ThrowCompletionOr<String> temporal_instant_to_string(GlobalObject& global_object // 4. If outputTimeZone is undefined, then if (output_time_zone.is_undefined()) { - // TODO: Can this really throw...? - // a. Set outputTimeZone to ? CreateTemporalTimeZone("UTC"). - output_time_zone = TRY(create_temporal_time_zone(global_object, "UTC"sv)); + // a. Set outputTimeZone to ! CreateTemporalTimeZone("UTC"). + output_time_zone = MUST(create_temporal_time_zone(global_object, "UTC"sv)); } // 5. Let isoCalendar be ! GetISO8601Calendar(). |