diff options
author | Linus Groh <mail@linusgroh.de> | 2021-09-16 21:42:01 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-17 08:25:12 +0100 |
commit | f8d92232c88a659a871e7cb498270c13c6a1524f (patch) | |
tree | 86bf517f0d6a84495922af77acd9a9d18d95265d /Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp | |
parent | dea43d88e70f3a287e152a98908ed5c391a4409f (diff) | |
download | serenity-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.cpp | 4 |
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)); |