mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:47:34 +00:00
LibJS: Avoid an unnecessary String in create_list_from_array_like()
This commit is contained in:
parent
a31855ae10
commit
f4180b7269
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ ThrowCompletionOr<MarkedValueList> create_list_from_array_like(GlobalObject& glo
|
||||||
// 6. Repeat, while index < len,
|
// 6. Repeat, while index < len,
|
||||||
for (size_t i = 0; i < length; ++i) {
|
for (size_t i = 0; i < length; ++i) {
|
||||||
// a. Let indexName be ! ToString(𝔽(index)).
|
// a. Let indexName be ! ToString(𝔽(index)).
|
||||||
auto index_name = String::number(i);
|
auto index_name = PropertyName { i };
|
||||||
|
|
||||||
// b. Let next be ? Get(obj, indexName).
|
// b. Let next be ? Get(obj, indexName).
|
||||||
auto next = TRY(array_like.get(index_name));
|
auto next = TRY(array_like.get(index_name));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue