From 341626e2ea0f3b766ab3a53072f14da948f43f3b Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Fri, 11 Aug 2023 07:51:56 -0400 Subject: [PATCH] LibJS: Reorder NumberFormat's rounding priority resolved option This is a normative change in the ECMA-402 spec. See: https://github.com/tc39/ecma402/commit/0fbf16c --- Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp index 544c1ddc1ece50..4b4f501ae2ed1b 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp @@ -179,8 +179,8 @@ JS_DEFINE_NATIVE_FUNCTION(NumberFormatPrototype::resolved_options) MUST(options->create_data_property_or_throw(vm.names.signDisplay, PrimitiveString::create(vm, number_format->sign_display_string()))); MUST(options->create_data_property_or_throw(vm.names.roundingMode, PrimitiveString::create(vm, number_format->rounding_mode_string()))); MUST(options->create_data_property_or_throw(vm.names.roundingIncrement, Value(number_format->rounding_increment()))); - MUST(options->create_data_property_or_throw(vm.names.trailingZeroDisplay, PrimitiveString::create(vm, number_format->trailing_zero_display_string()))); MUST(options->create_data_property_or_throw(vm.names.roundingPriority, PrimitiveString::create(vm, number_format->computed_rounding_priority_string()))); + MUST(options->create_data_property_or_throw(vm.names.trailingZeroDisplay, PrimitiveString::create(vm, number_format->trailing_zero_display_string()))); // 6. Return options. return options;