mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibJS: Add missing comment in OrdinaryToPrimitive
This commit is contained in:
parent
bfb4f070ba
commit
86e3840202
Notes:
sideshowbarker
2024-07-17 11:24:58 +09:00
Author: https://github.com/linusg
Commit: 86e3840202
Pull-request: https://github.com/SerenityOS/serenity/pull/13873
Reviewed-by: https://github.com/IdanHo
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) {
|
||||
// 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 };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue