mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:57:35 +00:00
LibJS: Replace CreateDataPropertyOrThrow with Set in TypedArray toSorted
This was an errant transcription in 4dbb2c2d44
.
This commit is contained in:
parent
34e328e580
commit
69f6fbdf99
1 changed files with 2 additions and 2 deletions
|
@ -1640,8 +1640,8 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::to_sorted)
|
|||
// 9. Let j be 0.
|
||||
// 10. Repeat, while j < len,
|
||||
for (size_t j = 0; j < length; j++) {
|
||||
// Perform ! Set(A, ! ToString(𝔽(j)), sortedList[j], true).
|
||||
MUST(return_array->create_data_property_or_throw(j, sorted_list[j]));
|
||||
// a. Perform ! Set(A, ! ToString(𝔽(j)), sortedList[j], true).
|
||||
MUST(return_array->set(j, sorted_list[j], Object::ShouldThrowExceptions::Yes));
|
||||
// b. Set j to j + 1.
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue