summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-03-10 19:51:24 +0100
committerLinus Groh <mail@linusgroh.de>2022-03-10 23:20:39 +0100
commit251f5e888578acfe3b19e5bfce3d8e49a306c5c6 (patch)
treed96bb850610a346c178137f961e6ace9f114f22e /Userland/Libraries/LibJS
parent7f5b4842f28d27793552fe5e268c136aec15c444 (diff)
downloadserenity-251f5e888578acfe3b19e5bfce3d8e49a306c5c6.zip
LibJS: Use CreateTemporalCalendar in GetBuiltinCalendar
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/f6b3a10
Diffstat (limited to 'Userland/Libraries/LibJS')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp
index 4920a16109..ed2cabfddf 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp
@@ -69,8 +69,8 @@ ThrowCompletionOr<Calendar*> get_builtin_calendar(GlobalObject& global_object, S
if (!is_builtin_calendar(identifier))
return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidCalendarIdentifier, identifier);
- // 2. Return ? Construct(%Temporal.Calendar%, ยซ id ยป).
- return static_cast<Calendar*>(TRY(construct(global_object, *global_object.temporal_calendar_constructor(), js_string(vm, identifier))));
+ // 2. Return ! CreateTemporalCalendar(id).
+ return MUST(create_temporal_calendar(global_object, identifier));
}
// 12.1.4 GetISO8601Calendar ( ), https://tc39.es/proposal-temporal/#sec-temporal-getiso8601calendar