1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:07:46 +00:00

LibJS: Avoid an unnecessary String in create_list_from_array_like()

This commit is contained in:
Andreas Kling 2021-10-04 22:53:04 +02:00
parent a31855ae10
commit f4180b7269

View file

@ -77,7 +77,7 @@ ThrowCompletionOr<MarkedValueList> create_list_from_array_like(GlobalObject& glo
// 6. Repeat, while index < len,
for (size_t i = 0; i < length; ++i) {
// a. Let indexName be ! ToString(𝔽(index)).
auto index_name = String::number(i);
auto index_name = PropertyName { i };
// b. Let next be ? Get(obj, indexName).
auto next = TRY(array_like.get(index_name));