summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-06-15 00:20:05 +0100
committerLinus Groh <mail@linusgroh.de>2022-06-15 17:49:20 +0100
commiteaf6f20ed1e153770b57c30fd95b8d0a082cc439 (patch)
treec2bf0609cae72a07996f10aa785b2f7119730b7f /Userland
parentc0986be2c157d811d39f8425d256786b58400f49 (diff)
downloadserenity-eaf6f20ed1e153770b57c30fd95b8d0a082cc439.zip
LibJS: Move assertion step around in Calendar.prototype.mergeFields
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/f790821
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp
index b0b09084f9..a2242afc36 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp
@@ -572,15 +572,15 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::merge_fields)
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
auto* calendar = TRY(typed_this_object(global_object));
- // 3. Assert: calendar.[[Identifier]] is "iso8601".
- VERIFY(calendar->identifier() == "iso8601"sv);
-
- // 4. Set fields to ? ToObject(fields).
+ // 3. Set fields to ? ToObject(fields).
auto* fields = TRY(vm.argument(0).to_object(global_object));
- // 5. Set additionalFields to ? ToObject(additionalFields).
+ // 4. Set additionalFields to ? ToObject(additionalFields).
auto* additional_fields = TRY(vm.argument(1).to_object(global_object));
+ // 5. Assert: calendar.[[Identifier]] is "iso8601".
+ VERIFY(calendar->identifier() == "iso8601"sv);
+
// 6. Return ? DefaultMergeCalendarFields(fields, additionalFields).
return TRY(default_merge_calendar_fields(global_object, *fields, *additional_fields));
}