mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibJS: Move assertion step around in Calendar.prototype.mergeFields
This is an editorial change in the Temporal spec.
See: f790821
This commit is contained in:
parent
c0986be2c1
commit
eaf6f20ed1
1 changed files with 5 additions and 5 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue