diff options
author | Linus Groh <mail@linusgroh.de> | 2022-05-01 18:24:05 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-05-01 22:13:21 +0200 |
commit | 86e38402020cf19bb0f618d797b869a8c4e4bc1c (patch) | |
tree | 72e0755d82447e1e7649c49dffd830dde9af239a | |
parent | bfb4f070badaf1931482102fd4803523b6e4d94e (diff) | |
download | serenity-86e38402020cf19bb0f618d797b869a8c4e4bc1c.zip |
LibJS: Add missing comment in OrdinaryToPrimitive
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Object.cpp | 4 |
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 }; } |