summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp
index 60b5525c96..790e13b46c 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp
@@ -138,12 +138,12 @@ ThrowCompletionOr<RelativeTimeFormat*> initialize_relative_time_format(VM& vm, R
relative_time_format.set_numeric(numeric.as_string().deprecated_string());
// 19. Let relativeTimeFormat.[[NumberFormat]] be ! Construct(%NumberFormat%, « locale »).
- auto* number_format = MUST(construct(vm, *realm.intrinsics().intl_number_format_constructor(), PrimitiveString::create(vm, locale)));
- relative_time_format.set_number_format(static_cast<NumberFormat*>(number_format));
+ auto number_format = MUST(construct(vm, *realm.intrinsics().intl_number_format_constructor(), PrimitiveString::create(vm, locale)));
+ relative_time_format.set_number_format(static_cast<NumberFormat*>(number_format.ptr()));
// 20. Let relativeTimeFormat.[[PluralRules]] be ! Construct(%PluralRules%, « locale »).
- auto* plural_rules = MUST(construct(vm, *realm.intrinsics().intl_plural_rules_constructor(), PrimitiveString::create(vm, locale)));
- relative_time_format.set_plural_rules(static_cast<PluralRules*>(plural_rules));
+ auto plural_rules = MUST(construct(vm, *realm.intrinsics().intl_plural_rules_constructor(), PrimitiveString::create(vm, locale)));
+ relative_time_format.set_plural_rules(static_cast<PluralRules*>(plural_rules.ptr()));
// 21. Return relativeTimeFormat.
return &relative_time_format;