diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp index a72c017549..96fac8169a 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp @@ -244,7 +244,6 @@ ThrowCompletionOr<String> format_relative_time(VM& vm, RelativeTimeFormat& relat ThrowCompletionOr<Array*> format_relative_time_to_parts(VM& vm, RelativeTimeFormat& relative_time_format, double value, StringView unit) { auto& realm = *vm.current_realm(); - auto& global_object = realm.global_object(); // 1. Let parts be ? PartitionRelativeTimePattern(relativeTimeFormat, value, unit). auto parts = TRY(partition_relative_time_pattern(vm, relative_time_format, value, unit)); @@ -258,7 +257,7 @@ ThrowCompletionOr<Array*> format_relative_time_to_parts(VM& vm, RelativeTimeForm // 4. For each Record { [[Type]], [[Value]], [[Unit]] } part in parts, do for (auto& part : parts) { // a. Let O be OrdinaryObjectCreate(%Object.prototype%). - auto* object = Object::create(realm, global_object.object_prototype()); + auto* object = Object::create(realm, realm.global_object().object_prototype()); // b. Perform ! CreateDataPropertyOrThrow(O, "type", part.[[Type]]). MUST(object->create_data_property_or_throw(vm.names.type, js_string(vm, part.type))); |