summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-09-16 21:42:01 +0100
committerLinus Groh <mail@linusgroh.de>2021-09-17 08:25:12 +0100
commitf8d92232c88a659a871e7cb498270c13c6a1524f (patch)
tree86bf517f0d6a84495922af77acd9a9d18d95265d /Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
parentdea43d88e70f3a287e152a98908ed5c391a4409f (diff)
downloadserenity-f8d92232c88a659a871e7cb498270c13c6a1524f.zip
LibJS: Convert Calendar AOs to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
index da7d20d7e9..75a343c5b1 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
@@ -70,9 +70,7 @@ Value PlainYearMonthConstructor::construct(FunctionObject& new_target)
auto m = TRY_OR_DISCARD(to_integer_throw_on_infinity(global_object, iso_month, ErrorType::TemporalInvalidPlainYearMonth));
// 5. Let calendar be ? ToTemporalCalendarWithISODefault(calendarLike).
- auto* calendar = to_temporal_calendar_with_iso_default(global_object, calendar_like);
- if (vm.exception())
- return {};
+ auto* calendar = TRY_OR_DISCARD(to_temporal_calendar_with_iso_default(global_object, calendar_like));
// 6. Let ref be ? ToIntegerThrowOnInfinity(referenceISODay).
auto ref = TRY_OR_DISCARD(to_integer_throw_on_infinity(global_object, reference_iso_day, ErrorType::TemporalInvalidPlainYearMonth));