mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 10:37:42 +00:00
LibJS: Add missing comment in OrdinaryToPrimitive
This commit is contained in:
parent
bfb4f070ba
commit
86e3840202
1 changed files with 3 additions and 1 deletions
|
@ -1245,7 +1245,9 @@ ThrowCompletionOr<Value> Object::ordinary_to_primitive(Value::PreferredType pref
|
||||||
if (preferred_type == Value::PreferredType::String) {
|
if (preferred_type == Value::PreferredType::String) {
|
||||||
// a. Let methodNames be « "toString", "valueOf" ».
|
// a. Let methodNames be « "toString", "valueOf" ».
|
||||||
method_names = { vm.names.toString, vm.names.valueOf };
|
method_names = { vm.names.toString, vm.names.valueOf };
|
||||||
} else {
|
}
|
||||||
|
// 2. Else,
|
||||||
|
else {
|
||||||
// a. Let methodNames be « "valueOf", "toString" ».
|
// a. Let methodNames be « "valueOf", "toString" ».
|
||||||
method_names = { vm.names.valueOf, vm.names.toString };
|
method_names = { vm.names.valueOf, vm.names.toString };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue