1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

LibJS: Add missing comment in OrdinaryToPrimitive

This commit is contained in:
Linus Groh 2022-05-01 18:24:05 +02:00
parent bfb4f070ba
commit 86e3840202

View file

@ -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 };
}