url: use indexed appends in search params getAll

Use indexed writes when collecting matching parameter values.
This improves getAll throughput without changing result order.

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
PR-URL: https://github.com/nodejs/node/pull/66872
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
This commit is contained in:
Roberto Bianchi authored and Antoine du Hamel committed 2026-11-12 18:00:38 +01:00
1 parent 4c8cece947
commit 92bfe9ae4f
1 file changed
+1 -1
+1 -1
View File
@@ -624,7 +624,7 @@ class URLSearchParams {
const { length } = list;
for (let i = 0; i < length; i += 2) {
if (list[i] === name) {
ArrayPrototypePush(values, list[i + 1]);
values[values.length] = list[i + 1];
}
}
return values;