summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Object.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Object.cpp b/Userland/Libraries/LibJS/Runtime/Object.cpp
index 4644e5599a..08a7d8fd25 100644
--- a/Userland/Libraries/LibJS/Runtime/Object.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Object.cpp
@@ -1245,7 +1245,9 @@ ThrowCompletionOr<Value> Object::ordinary_to_primitive(Value::PreferredType pref
if (preferred_type == Value::PreferredType::String) {
// a. Let methodNames be « "toString", "valueOf" ».
method_names = { vm.names.toString, vm.names.valueOf };
- } else {
+ }
+ // 2. Else,
+ else {
// a. Let methodNames be « "valueOf", "toString" ».
method_names = { vm.names.valueOf, vm.names.toString };
}